Go up one levelGo to Previous Go to Next

Remote Interfaces

Tcl send

By using the Tcl send command, a second Tcl application can control skycat and do basically anything. However, skycat offers an interface for using send that consists of a number of member procs in the SkyCat class. These procedures are well suited for use by a remote application, since they do not require any widget names. Of course this interface can also be used from within plugins or other Tcl code.

SkyCat Class Member Procs for use with Tcl send

Name

Description

SkyCat::get_catalog

This proc returns the instance name of a catalog widget. If more than one catalog window is open, it asks the user to select one from a list. If it can't find one, it reports an error and returns an empty string.

SkyCat::get_imagesvr

Same as above, but for the image server (DSS) window.

SkyCat::get_catalog_info

Returns the contents of the catalog window as a Tcl list. The format of the return value is {{ selected_row } {{ row1 } { row2 } ...}} where each row is a list of column values. The selected_row is empty if there is no selection, otherwise it is a list of column values in the selected row.

SkyCat::display_image

Fetch and display an image (from DSS), given the world coordinates (ra, dec, equinox) and a width and height in arcmin.

SkyCat::mark_image

Display a rectangle on the image at the given world coordinates center coordinates with the given width and height in arcmin and return the item's canvas tag or id.

SkyCat::unmark_image

Remove the given mark from the image, by specifying the id returned from SkyCat::mark_image.

SkyCat::load_image

Load a FITS image for viewing.

SkyCat::pick_object

Pop up a window and ask the user to select an object in the image. Wait for the selection and return the information for it in the form:

{x y ra dec equinox fwhmX fwhmY angle object background}

An optional Tcl command may be specifed to be called whenever a new object is selected. The command can include a " send ..." prefix to call a proc in another application.

SkyCat::get_skycat_images

Return a list of SkyCatCtrl class instances in this process (there might be multiple cloned instances of the image window, created via the " New Window" menu item). To get the top level window for an image, you can use the command [winfo toplevel $skycatImage]. The main windows for skycat have names such as .skycat1, .skycat2, etc., although you should not use the hard coded names. Use SkyCat::get_skycat_images and check that the return value actually still exists with [winfo exists $skycatImage].

Remote Socket Interface

The RTD ( Real-Time Display ) documentation has a section in the User's Guide describing a remote socket interface. This interface applies to Skycat as well. See the RTD documentation for more details. The socket interface works in basically the same way as Tcl send , except that you can use it from a non-Tcl based application. You can send any rtdimage commands over the socket to be evaluated. One useful rtdimage command is remotetcl , which evaluates its argument in RTD's Tcl interpreter.

SysV Shared Memory

The RTD documentation also describes the use of sysV shared memory. You can keep the image data in shared memory and use Tcl send or the RTD socket interface to tell skycat when to update the image.

Real-Time Server

rtdServer , the real-time server daemon used in VLT software, can be used with skycat or rtd to display images rapidly from shared memory. See the RTD documentation for a detailed description of this.

Mmap

Skycat and rtd use mmap to map image files to memory, since this is more efficient, especially for very large images. Applications can take advantage of this fact by modifying the image data in the file and then signaling skycat or rtd to redisplay the image.

See the rtdimage subcommand mmap , which supports this.


Go up one levelGo to Previous Go to Next

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