The AstroCat widget class defines a top level widget for searching and displaying astronomical catalog data. It contains a menubar with items for loading, editing, and saving catalog data and a table displaying rows and columns of catalog data. This class does not know anything about images or plotting objects in images, however these features may be added in a derived class (see the SkySearch(n) in the skycat package for an example). You can also run this class as a standalone application with the command "astrocat". The application options are the same as the class options.
results QueryResult(n) widget to display catalog query results. searchopts AstroQuery(n) widget for displaying catalog search options.
-anchor Set the anchor for labels. -catalog Name of catalog. -catalogtype Type of catalog (catalog or archive). -debug Flag: if true, run queries in foreground for better debugging. -id Optional unique id, used in searching for already existing catalog widgets. -labelfont Font to use for labels. -labelwidth Set the width for displaying labels. -tcs If -tcs is 1, use fixed format TCS catalog listings. -valuefont Font to use for values. -wcsfont Font to use for ra,dec labels.
add_selected {} Add the currently selected rows to a local catalog file. add_to {} Add the rows in the current listing to a local catalog file. clear {} Clear the table listing. close {} Close this window. disable_search {{arg 1}} Disable the search button, if the arg is 1, otherwise enable it. display_image_file {filename} Display the given image file (To be defined in a subclass). edit_selected_object {} Pop up a window so that the user can edit the selected object(s). enter_new_object {} Pop up a dialog to enter the data for a new object for a local catalog. feedback {} This method is called by the fileevent handler during the data transfer from the HTTP C++ class to give the user feedback about how much there is left to copy, etc... Read a line from the feedback pipe, which should contain text to be displayed in the progress widget. When we are in busy (disabled, waiting) mode, we also interpret some special messages, such as: "total length: n bytes" to update the progress bar. get_col {name row} Return the value for the given column name in the given row. get_equinox {} return the equinox. get_table {} return the name of the TableList. getimage_from_args {ra dec name equinox width height} Get the requested image from the image server based on the given arguments for the world coord position or name and the given width and height. help {} If the catalog has a "help" URL, try to display it in netscape using the netscape remote interface. interrupt {} Interrupt the current search . iscat {} Return 1 if this window is for a searchable catalog, and 0 otherwise (in which case it must be an image server window). more {} Use the "more" URL to display more info about an object using netscape or mosaic. open_catalog {} Open the catalog for this window. plot {} Plot the stars/objects found in the previous search in a (image) window. The symbols to use are taken from the config file. (To be defined in a subclass). preview {} Assuming there is a field called "preview" that is the URL of an image, get the image or table data for the selected line over HTTP and display it The preview data may be an image or other data, such as a tab table to display as a graph (like the "cuts" (RtdImageSpectrum) graph). print {} Pop up a dialog to print the table listing. query_done {errmsg headings info more} This method is called when the background query is done. Args: errmsg - If this is not empty, it contains an error message and the following args should be ignored. If there were no errors, this arg is an empty string. headings - are the column headings info - is a list of rows (result of query) more - is a flag set to 1 if there were more rows available that were not returned due to the maxrows limit set. remove_selected {} Remove the currently selected rows from a local catalog file. reset_table {} Reset table dialogs if needed. save_as {} Save the current data to a local catalog. search {args} Start the catalog search based on the current search options and display the results in the table. select_columns {} Pop up a dialog to select table columns to display. select_result_row {} This method is called whenever a result row is selected. Note the selected values and enable/disable some buttons. set_info {headings info {more 0}} This method could be used by a plugin to set the contents of the listing without doing a query. The arguments are the table headings (list of strings) and the table data (list of rows, where each row is a list of values). The "more" flag is optional and indicates that there would be more data. set_namesvr {name} Set the name server to use to resolve object names. set_plot_symbols {} Pop up a dialog to set the plot symbols to use for this catalog. set_pos_radius {list} Set the values for the position and radius entries from the given list, which should be in the format {ra dec equinox radius} if we are using wcs, otherwise {x y radius}. set_pos_width_height {list} Set the values for the position, width and height entries from the given list, which should be in the format {ra dec equinox width height (in arcmin)} for wcs, or {x y width height}, for pixel coordinates. . set_search_cols {} Pop up a dialog to set the search columns to use for this catalog. set_show_cols {cols} Called when the user has selected columns to show. set_sort_cols {sort_cols sort_order} Called when the user has selected columns to sort the results by. The first arg is the sort columns, the second arg is the order (increasing, decreasing). set_state {state} Set/reset widget states while busy . set_tcs_columns {} Toggle the TCS option (use the tcscat or the astrocat Tcl command). sort_dialog {} Pop up a dialog to sort the list. update_search_options {} Update the search option entries after they have been edited.
add_dialog_buttons {} Add the dialog button frame. add_menubar {} Add the menu bar. add_progress_bar {} Add a progress bar to display the progress of data transfers. add_result_table {} Add the table for displaying the query results. add_search_options {} Add the search options panel. get_name_servers {} Add the name server catalogs to the name server menu. get_preview {} Get the preview image given by $preview_url_ into a temp file. init {} Called after options have been evaluated. layout_dialog {} Do the dialog window layout. make_short_help {} Add a short help window and set the help texts. preview_done {status result} This method is called when we have received the preview data The "status" argument is the status of the background http get operation (0 if ok). The result is a list of {filename Content-type}, where filename contains the data and Content-type indicates the type of the preview data. Decompression is already taken care of, so we only expect to get a FITS image here or a tab table to plot. If we get an authorization error, we ask the user to type in a username and password and retry the operation with the new info. This is needed for some HTTP server sites that have special restrictions on data access (especially image access). set_feedback {onoff} Open or close a pipe to get feedback during HTTP transfers. (To save limited fds, we close the feedback pipe after each HTTP op). The arg should be "on" to turn feedback on, or "off" to turn it off. set_instance {} Keep an array of instances(name,id) to help locate the window for a catalog. set_logfile {} Create the ~/.skycat dir if it does not already exists and keep a log file there. set_menu_states {} Enable or disable some menus.
catalog_directory {{id ""} {classname AstroCat} {debug 0} {w ""}} Pop up a window to browse the catalog directories. id is an optional unique id to be associated with a new catalog widget. classname is the name of the AstroCat subclass to use to create new catalog widgets (defaults to "AstroCat"). debug is a flag is passed from the command line. If true, querries are run in the foreground, to make debugging easier. w should be the caller's top level window, if specified. .
col_ Array(uppercase col name) of col index from catalog headings. count_ Count used for filename generation. edit_menu_ Name of Edit menu widget. file_menu_ Name of File menu widget. headings_ List of catalog column headings (from results of most recent query). info_ Result from most recent query (list of rows). initialized_ Flag: set at end of constructor. instance_idx_ Index of this object in the instances_ array. iscat_ Flag: true if catalog is not an image server. logfile_name_ Log file handle (used to log URLs). more_url_ More-info URLs for selected object. ns_menu_ Name of Name Server menu widget. object_name_ Currently selected object (Id field in row). options_menu_ Name of Options menu widget. preview_url_ Preview URLs for selected object. reset_columns_ Flag: set when the column headings are changed between TCS and normal. results_ QueryResult widget used to display search results. rfd_ Pipe to read feedback during HTTP transfer. search_state_ Flag: true if searching is allowed. searchopts_ AstroQuery widget used to manage search options. state_ Current state: normal, disabled (i.e.: waiting). wfd_ Pipe to write feedback during HTTP transfer.
astrocat_ C++ astrocat object used by static member procs. catalog_menu_info_ Array(TopLevelWidget instance) of command used to update the Data-Servers menu. This is used to make it posible to update all instances of this menu in various top level windows. checked_proxies_ Flag: set to 1 after we checked for a proxy server. current_instance_ Current instance name. instances_ Array mapping catalog name to widget/class name. n_instances_ Instance count.
Please send questions or comments to abrighto@eso.org@eso.org.
Copyright © 1998 ESO - European Southern Observatory