DS9

CXC Science Data Systems

Analysis menu files

Analysis menu files - use

Command:analysis load [filename]
Menu:Analysis - Load Analysis Commands
Description:Loads an external analysis menu in .ans format can be appended to Analysis -

Command:analysis clear
Menu:Analysis - Clear Analysis Commands
Description:Deletes the loaded menu.(Caution: this includes removing CIAO's DAX from the menu if in the CIAO environment).

Analysis files can be autoloaded with Edit - Preferences - Analysis - Analysis File entries, if Edit - Preferences - Analysis - Analysis File - Autoload is enabled.

If Analysis - Analysis Command Log is selected, or Edit - Preferences - Analysis - Analysis Log - Show Command is selected, the commands are echoed to the analysis log.

The DS9 CL allows additional capabilities not present in the GUI:

Command:analysis task [n]
Menu:-
Description:Run task [n] in th current analysis menu. The numbers are in order of task loading, starting with 0

Command:analysis task [name]
Menu:-
Description:Run task in the current analysis menu with the given name.

Command:analysis message [text]
Menu:-
Description:Append a message to the output

Command:analysis text [text]
Menu:-
Description:Append text to the output

Analysis menu files - syntax

Each file type known to DS9 can have user-defined analysis commands associated with it. These analysis commands are defined at start-up time , or loaded by the user, by means of an ASCII analysis description file. The analysis commands are available for execution, either via the Analysis Menu or the XPA point Analysis. In addition, commands may be bound to events, such as keystrokes or mouse clicks. This type of command is called a bind command.

DS9 searches for an analysis file named ds9.ans or ds9.analysis in the current directory and $HOME to be loaded at startup. In addition, DS9 will search the following directories for any analysis files to be loaded at startup in the form of *.ds9: the current directory, $HOME/bin, /usr/local/bin, /opt/local/bin, and /soft/saord/bin. Finally, the user may specify analysis files to be loaded at startup in the preferences analysis panel. The user may also load or clear current analysis commands via command line options or the Analysis menu.

When activated, either from the menu, XPA, or bound event, an analysis command first is macro-expanded to fill in user-defined arguments and then is executed externally. Results may be displayed in a separate text window, plot window, or in a image frame.

Task names may contain space characters. All lines may be indented. Also, the '#' character is a comment character. A separator can be inserted in the menu by specifying the following sequence '- - -'.

Example:

    # this will insert a menu separator
    ---

The analysis file that defines the known analysis commands consists of comment and separator lines and one or more task descriptors, each of which has the following format:

The allowed command types are:

Analysis files: Macros

The following macros are macro-expanded to fill in user-defined arguments before the command is executed. Strings that contain $ that the user does not want to be expanded may be escaped by using

$$

All strings that contain

$
that are not a macro name will not be affected.

For example:

    echo "$$data $foo" | $text
will display a text dialog that contains "$data $foo"

The macros are: