Go up one levelGo to Previous Go to Next

SkyCatCtrl(n)

NAME

 
 SkyCatCtrl - image display widget with catalog extensions

NAMESPACE

 
 skycat

PARENT CLASS

 
 rtd::RtdImageCtrl

SYNOPSIS

 
 SkyCatCtrl <path> ?options?

DESCRIPTION

 
 This class extends the RtdImageCtrl class (see RtdImageCtrl(n)) by
 adding image catalog extensions and user interface dialogs for use with
 astronomical catalogs.


WIDGET OPTIONS

 
 -debug
        Flag: if true, run queries in the foreground for better
        debugging.

PUBLIC METHODS

 
 about {}
        Display a popup window with information about this application.

 add_history {filename}
        Add the current image to the history catalog under the given
        filename.  The current FITS header is used to extract information
        about the image to put in the catalog. The file basename is
        assumed to be the unique id.

 apply_history {filename}
        Check if the given filename is in the history catalog, and if so,
        apply the cut levels and color settings for the file.

 clear {}
        This method is also redefined from the parent class to set the
        window header info.

 convert_coords {coords from_units to_units}
        Convert the given coordinates from $from_units to $to_units and
        return the result. $coords may be a list of an even number of
        values {x1 y1 x2 y2 x3 y3 ...}. The result is the same list,
        converted to the output coordinates.

 display_fits_hdus {}
        Display a popup window listing the HDUs in the current image, if
        any.

 draw_symbol {shape x y xy_units radius radius_units bg fg symbol_tags
            {ratio 1} {angle 0} {label ""} {label_tags ""}}
        Draw a symbol on the image with the given shape at the given
        coordinates (in the given x,y units), with the given radius (in
        radius_units), bg and fg color, canvas tags list, x/y ratio and
        rotation angle.

        shape may be one of "circle", "square", "plus", "cross",
        "triangle", "diamond", "ellipse", "compass", "line", "arrow".

        x and y are the coordinates in "xy_units", which is one of the
        units accepted by the Rtd commands (canvas, image, screen, "wcs
        $equinox", "deg $equinox").

        The radius value is interpreted in radius_units.

        bg and fg are X color names for the symbol (may be the same).

        symbol_tags should be a Tcl list of canvas tags for the symbol.

        ratio and angle are optional and used to stretch/shrink and rotate
        the symbol. The default ratio is 1, default angle 0.

        label is an optional text for a label to place near the symbol.

        label_tags should be a Tcl list of canvas tags for the label, or
        an empty or null string, if there is no label.

        Returns an error if the coordinates or part of the symbol are off
        the image.

        Uses world coordinates, if available, for the rotation and
        orientation, for symbols that support it (i.e.: rotation is
        relative to WCS north).

 forward_image {}
        Go forward again to the next image.

 load_graphics_from_image {}
        Check if there is a FITS table with the same name as the current
        image extension, but with ".GRAPHICS" appended.  If found, restore
        the previously saved line graphics from the table.  This method is
        called automatically when a new image extension is loaded.

 mark_image {ra dec width height}
        Display a rectangle on the image at the given center coords with
        the given width and height and return the items tag or id.

 previous_image {}
        Go back to the previous image.

 save_as {{dir "."} {pattern "*"} {x0 ""} {y0 ""} {x1 ""} {y1 ""}}
        Save the current image or a section of the current image to a file
        in FITS format chosen from a file name dialog. If dir and pattern
        are specified, they are used as defaults for the file selection
        dialog.  If x0, y0, x1 and y1 are specified (canvas coordinates),
        then a section of the image is saved.

        The return value is the name of the new file, if any, or an empty
        string.  (redefined from parent class to set filename_, used in
        check_save).

 save_graphics_with_image {}
        Save the current line graphics in a FITS binary table in the
        image.  The table has 3 columns: "type", "coords", and "config".
        "type" gives the shape and is one of the Tk canvas item types.
        "coords" is a list of coordinates for the item.  "config" is a Tcl
        list of configuration options for the item.  There can be one
        graphics table for each image extension. For each image extension,
        the graphics table is called "${extname}.GRAPHICS".

 select_area {{shape rectangle}}
        Ask the user to select an area of the image by dragging out a
        region and return as a result a list of the form {x0 y0 x1 y1} in
        pixels.

 selected_area {id x0 y0 x1 y1}
        This method is called when the user has selected an area of the
        image.  The results are in canvas coordinates, clipped to the area
        of the image.

 send_to_netscape {url}
        Send a URL to be displayed by netscape.

 subscribe {variable dhshost dhsdata}
        Subscribe to (or unsubscribe from) the OLAF DHS server images
        (ESO/Archive On-Line Archive Facility project: use the -dhshost
        and -dhsdata options to add this feature.) The first argument is
        the name of the trace variable used in the checkbutton menuitem.
        dhshost is the name of the host running the DHS server, to which
        we subscribe.  dhsdata is the directory to use to hold the images
        files (temporary files).

 unmark_image {id}
        Remove the given mark from the image.

 update_fits_hdus {}
        Update the popup window listing the HDUs in the current image.

 update_history_menu {w m}
        Update the given menu with image history items. $w is the
        TopLevelWidget containing the menubar.

PROTECTED METHODS

 
 check_save {}
        If the current image is not saved in a file (came from a server,
        ...) check if it should be saved before loading a new image. Then,
        if the file exists, add image info for it to the history catalog.

 display_logo {}
        Display the skycat logo in the center of the image window with
        some copywrite text Note that we assume here that the logo was
        created previously and the name of the image is in the global var
        skycat_logo.

 init {}
        This method is called from the base class (TopLevelWidget) after
        all the options have been evaluated.

 load_fits_ {}
        This method is redefined here from the base class to include the
        file name in the window header and note the filename.

 new_image_cmd {}
        This method is called by the image code whenever a new image is
        loaded.  It is redefined here to handle multiple HDUs in FITS
        files.

 update_title {}
        Update the toplevel window header and icon name to include the
        name of the file being displayed.

PROTECTED VARIABLES

 
 back_list_
        Used for the Go=>Back/Forward menu itemes.

 filename_
        The name of the image file, if any.

 pi_
        Const PI.

 rad_
        Const PI/180.

 subscribe_pid_
        Pid of rtdSubscribe process (OLAF).

SEE ALSO

 
 RtdImageCtrl(n)

 


- - - - - -
Last change: 07 May 99

 


Go up one levelGo to Previous Go to Next

Please send questions or comments to abrighto@eso.org.
Copyright © 1998 ESO - European Southern Observatory