About Chandra Archive Proposer Instruments & Calibration Newsletters Data Analysis HelpDesk Calibration Database NASA Archives & Centers Chandra Science Links

Skip the navigation links
Last modified: December 2006

URL: http://cxc.harvard.edu/ciao3.4/peg.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 3.4 peg Context: gui

Synopsis

Parameter Editor Gui (for CXCDS parameter interface)

Syntax

peg [-help]
peg command
peg command command-options
peg /path/to/parfile[.par]

Description

Peg is a graphical user interface (GUI) application which allows users to easily view and modify parameter files and then run the associated tool with these values.

Opening files

Peg allows users several methods of opening a parameter file- both from the command line and from the gui itself. From the commandline, a user may explicitly specify a file and path or may simply specify a toolname as arguments.

Command Action
peg dmlist Starts the editor with the dmlist.par file found in the user's $PFILES directory (i.e. the output of 'paccess dmlist').
peg /tmp/dmlist.par Starts the editor and uses the specified parameter file (here /tmp/dmlist.par).
peg Start the editor without loading any parameter file.

Files may be loaded from the GUI via the "File" pulldown menu. The option "Open" invokes a file selection dialog box which allows the user to choose a file to open. The default path of the dialog is specified by the local portion of the user's PFILES environment variable. The "Open List" pulldown submenu maintains a list of the 10 most recently accessed parameter files. The user can open one of the specified files by selecting it from the pull down menu.

Saving files

The File pulldown menu contains options to 'Save' or 'Save As'. The Save option merely writes the changes to the specified parameter file. If the file has READ ONLY permission, a message will appear in the message status window stating that the updates could not be written to the file. The [Save] button on the Command Execution Panel behaves indentically. The 'Save As' option from the 'File' pulldown menu invokes a save dialog which allows the user to specify the name and path of the output. If the editor detects modifications to the data when an exit request is made, a dialog will afford the user the opportunity to save the changes. The save options behave in a manner similar to the tool pset, where changes to hidden parameters will be written to the parameter file regardless of whether a parameter has a 'learned' mode or not.

Running Tools

The Command Execution Panel contains two buttons [Run & Exit] and [Run] which may be used to execute a tool within a taskmonitor shell. The former option exits the parameter editor gui and invokes a copy of taskmonitor to run the specified tool. Changes to the parameter file occur from the run of the application and unsaved parameter changes may not be saved. The latter option invokes a copy of taskmonitor to run the application but does not exit the parameter editor gui. See "ahelp taskmonitor" for more information on the taskmonitor window.

Resetting parameter files

The parameter editor gui contains a [PUNLEARN] button in the Command Execution Panel. This button is tied into CIAO's punlearn parameter file utility and resets parameter values to their specified system default values. This option only works on parameter files which have a system level parameter file.

Obtaining Tool Help

The [Help] button on the Command Execution Panel allows the user to obtain help on an application via CIAO's on-line documentation and ahelp utility. If documentation for an open parameter file's corresponding tool exists, clicking on the [Help] button will invoke a terminal window contain the help information for that tool. Context specific help for individual parameters is available, when existing documentation exists, via the "Parameter Help" selection in the floating menu.

If the window containing the help text disappears before giving you a chance to read the text then it is likely that your PAGER environment variable is set to "more". Try changing it to "less" or "less -s" and then re-start peg; for csh/tcsh users this is done by

  unix% setenv PAGER "less -s"

The floating menu

Clicking on the right mouse button when the cursor is in the area of the screen between a parameter's label and widget to adjust its value will invoke a drop down menu with options specific to the parameter. The options in the drop down menu include "Indirection/Default" (toggles the widget from its default type to a text field to enter an indirection, "Restore Initial Value" (sets the entry back to its original value), "Set Value to Min" (sets the entry to its minimum allowed value), "Set Value to Max" (sets the entry to its maximum allowed value), "Display" (invokes a pulldown to display the values of the fields of the entry into the message status window), "Parameter Help" (displays the ahelp text for the current entry), and "Browse Files" (invokes a file selection dialog to specify a filename). Inappropriate options are grayed out or set insensitive. For instance, if a parameter does not have a specified min value, the "Set Value to Min" option will not be selectable.

Increment/decrement numeric entries

Numeric entries (reals/integers) are displayed in the editor as text boxes enclosed within left and right arrow buttons. The arrow buttons cause the entry's value to be incremented (right arrow button) or decremented (left arrow button) by a scaled value when the button is selected (with the left-mouse button). The scale used to adjust the entries value is configurable by clicking the middle mouse button on either arrow and adjusting the scale. The scale value is a value >= 0 that is added on right arrow and subtracted on left left arrow operations.

The "Increment/Decrement Scale" dialog for integer parameters contains a slider that may be used in place of the text field to enter the increment step. To move the slider, you may click on it with either the middle or left mouse button. However, if you wish to "snap" to a value in the slider range, click the middle-mouse button at the appropriate position in the slider's trough. Using the left mouse button adjusts the slider but does not change the increment value.

The Command Line box

Any text entered in this field is appended to the command that is being executed. It may be used to conveniently change hidden parameters, especially in long parameter files (e.g. acis_process_events). For example, if you would like to re-run a command, changing only the clobber parameter, simply add "cl+" (or "clobber+" or "clobber=yes") to the Command Line box.

Configuring the look of peg

Users may update the peg.par parameter file to configure peg to suit their taste. In addition, a number of resources may be set via the CXCdefaults configuration file. If a local $HOME/.CXCdefaults file exists it is utilized, otherwise the system level file $ASCDS_INSTALL/config/system/CXCdefaults is used (see "ahelp gui" for more information on this file). The entries which are peg specific are prefixed with "peg*" and include:

Resource name Description
foreground text color
background peg's background color
autoColor the color of labels for auto parameters
hiddenColor the color of labels for hidden parameters

Users may modify these values to suit their preference. For instance, setting

  peg*autoColor : blue

will change the display color of labels for auto parameters to blue. The application needs to be exited and restarted for the changes to be visible.

Example 1

peg

Starts up peg but does not load any parameter file. The "File/Open" and "File/Open List..." menu items can be used to load any required parameter file.

Example 2

peg dmcopy

Starts up peg with the current parameter settings for the dmcopy tool.

Example 3

peg dmcopy infile=in.fits clobber+

Starts up peg with the current parameter settings for the dmcopy tool and then over-rides the infile and clobber parameters to be "in.fits" and "yes" respectively.

Example 4

peg /tmp/dmcopy.par

Starts up peg with the current parameter settings taken from the parameter file /tmp/dmcopy.par.

Example 5

peg peg

Here we use peg to edit the parameter file for peg.

Parameters

name type def min max
prompt boolean yes    
showhidden boolean yes    
savewarn boolean yes    
browse boolean yes    
pattern string *.fits    
delay integer 1000 1 5000
duration integer 5000 1000 10000
textwidth integer 25 12 100
spacing integer 10 0 50
verbose integer 1 0 5

Detailed Parameter Descriptions

Parameter=prompt (boolean default=yes)

Display the prompt field of the parameter as a tooltip.

This parameter controls whether of not the prompt field of parameters gets displayed when the mouse remains over the label of a parameter entry.

Parameter=showhidden (boolean default=yes)

Should hidden mode parameters be displayed in the editor

This parameter controls whether hidden parameters (mode=h in the parameter file) are displayed in the parameter editor.

Parameter=savewarn (boolean default=yes)

Prompt to save changes before exiting/opening another file

This parameter controls whether or not the parameter editor invokes a dialog to ask whether they want to save changes that have been made to the parameter file before exiting the editor or opening a parameter file.

Parameter=browse (boolean default=yes)

Should browse button be displayed for filename parameters

This parameter controls whether or not the browse button is displayed for filename type enties. If yes, a 'Browse' push button appears after the text field for filename parameters. This option does not affect the browse files option in the floating menu.

Parameter=pattern (string default=*.fits)

Browse dialog's default filter pattern

This parameter specifies the default pattern that the browse dialog should use to filter listed files. This parameter is used when the browse parameter is set to 'yes'.

Parameter=delay (integer default=1000 min=1 max=5000)

Length of time (ms) count before displaying prompts

This parameter specifies the amount of time to wait before displaying a parameter's prompt. This value is only used when the prompt parameter is set to 'yes'. The units are in milliseconds.

Parameter=duration (integer default=5000 min=1000 max=10000)

Length of time (ms) to display prompts

This parameter specifies the amount of time to display a parameter's prompt. This value is only used when the prompt parameter is set to 'yes'. The units are in milliseconds.

Parameter=textwidth (integer default=25 min=12 max=100)

Width of parameter text fields for String/Filename type parameters

This parameter specifies the number of characters to display in the text field prompt of string/filename type parameters. Strings longer than this value can be used, it is just that the field will not be able to display them in full.

Parameter=spacing (integer default=10 min=0 max=50)

Spacing offset between parameter entries

This parameter specifies the amount of spacing that is used between the widgets and labels for parameter entries in the Parameter Editing Pane.

Parameter=verbose (integer default=1 min=0 max=5)

Amount of information feedback provided to user

This parameter specifies the amount of information that is provided back to the user in the message status window. Its value is currently not utilized.

CHANGES IN CIAO 3.0.2

Cursor position for strings

Prior to CIAO 3.0.2, the position of the cursor within a text parameter (such as the infile parameter of dmlist) would be lost when another parameter was selected. This was particularly noticeable if you had selected a file using the "Browse" button - as the full path is included - and the field would change to display the start of the filename when another parameter was chosen.

The working directory for PEG

When peg is started up the status area at the bottom of the window now displays the directory in which peg was started. The message looks something like:

  Wed 19-Nov 11:43:08 The current working directory is: /data/chandra/

This can be useful to know since it is the directory in which peg will run any tool it is editing - and is therefore where the tool will look for any files (unless they are specified with an absolute path).

XmForm Warning messages

The "XmForm" warning message -

Warning: XmForm Form : attachment to (null) which is not a child,
         replaced with TextField

- which was seen on Linux and OS-X platforms - has been removed. Similarly, the following message seen on the Solaris and Alpha platforms has also been removed:

Warning: 
    Name: _formT
    Class: XmForm
    Abandoned edge synchronization after 10000 iterations.
    Check for contradictory constraints on the children of this Form widget.

XPA ACCESS POINT AND COMMANDS

As with most of the CIAO GUIs, peg has an XPA access point which can be used to control its behaviour: currently this is limited to closing down the application. Note that, unlike the other CIAO GUIs, peg does not add itself to any session that is currently available.

The default name is "peg" even if there are multiple copies already running. The "-xpa" command-line option can be used to change the name. Peg understands the following commands when sent via XPA:

  unix% xpaget peg

  exit:           Exit the current application
                  options: None
  quit:           Synonym for "exit"

ANALYSIS MENU AND COMMAND-LINE OPTIONS

The Analysis menu can be configured using a simple text file which uses the same format as the DS9 Analysis menu; for more details see "ahelp analysis-menu". Peg has several command-line options, although they are not needed by most users:

Option Description
-iconic Starts peg in an iconified/hidden state, if allowed by the window manager.
-toolmenu <file> Use <file> rather than the system default file for defining the Analysis menu.
-xpa <name> Sets the XPA access point of peg to <name>.

Bugs

Specifying tool options on the command-line

When tool options are given on the command line - for instance

  unix% peg dmcopy infile=in.fits clobber+

- then the parameter names must be given in full. If abbreviated - such as "clob+" - then they will be ignored.

Help text does not display properly

If the help window disappears before giving you a chance to read the text, then it is likely that your PAGER environment variable is set to "more". Try changing it to "less" or "less -s" and then re-start peg; for csh/tcsh users this is done by

  unix% setenv PAGER "less -s"

See the bugs page for this tool on the CIAO website for an up-to-date listing of known bugs.

Hardcopy (PDF): A4 | Letter
Last modified: December 2006



The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory.
60 Garden Street, Cambridge, MA 02138 USA.    Email: cxcweb@head.cfa.harvard.edu
Smithsonian Institution, Copyright © 1998-2004. All rights reserved.