Chandra X-Ray Observatory
Skip to the navigation links
Last modified: December 2013

Jump to: Description · Examples · Bugs · See Also

AHELP for CIAO 4.9


Context: gui


PEG: the parameter editor GUI (for CXCDS parameter interface)


peg command
peg /path/to/parfile[.par]


PEG (parameter editor GUI) is a graphical user interface (GUI) application which allows users to easily view and modify parameter files and then run the associated tool with the set 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 command line, a user may explicitly specify a file and path or may simply specify a toolname as the argument. The command "peg dmlist" would open the editor with the dmlist.par file found in the user's local $PFILES directory; "peg /tmp/dmlist.par" will use the specified parameter file; and "peg" on its own will start the editor without loading a specific file.

Files may be loaded from the GUI via the "File" pulldown menu. The option "Open" opens a file selection dialog box which allows the user to choose a file to open. The default path of the dialog at startup is the current working directory from which PEG was launched. Once a file is opened via the dialog, its path is remembered and used as the default if the "Open" option is reselected. The "Open List" pulldown menu 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 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 identically. The 'Save As' option from the 'File' pulldown menu opens a save dialog which allows the user to specify the name and path of the output. 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 [Run & Exit] option exits PEG and opens 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 [Run] option opens a copy of taskmonitor to run the application but does not exit PEG. See "ahelp taskmonitor" for more information on the taskmonitor window.

Resetting parameter files

PEG 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 ("ahelp tools punlearn").

Obtaining Tool Help

The [Tool Help] button on the Command Execution Panel allows the user to obtain help on an application via CIAO's help documentation, ahelp ("ahelp ahelp"). If documentation for an open parameter file's corresponding tool exists, clicking on the [Tool Help] button will open a terminal window that contains 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 restart 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 over a parameter's label will open a drop down menu with options specific to that parameter. The options in the drop down menu are

  • "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" - opens 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
  • "Browse Files" - opens a file selection dialog to specify a filename

Options which don't apply to the current parameter are grayed out as inactive. For instance, if a parameter does not have a specified minimum value, the "Set Value to Min" option will not be available.

Increment/decrement numeric entries

Numeric entries (reals/integers) are displayed as a text box that has arrow buttons to increase or decrease the value by a set factor when the left mouse button is clicked on one. The increment value may be adjusted by clicking the middle mouse button while the cursor is over the widget; the scale value must be >= 0.

The Analysis menu

The "Analysis" menu allows the user to run CIAO tools from taskmonitor. The configuration of this menu is described in "ahelp analysis-menu".

Configuring the look of PEG

PEG is written in gtk and relies on themes to control much of the appearance of the GUI. Users may override the default theme appearance of specify a particular them to use by editing their $HOME/.gtkrc.peg resource file. In the absence of the file, $HOME/.gtkrc.ciao is used. If neither exists, but $HOME/.gtkrc does, then it is used.

Additionally, users can adjust the appearance of the auto and hidden parameters for visual cues to easily identify the parameter types. PEG's resource file $HOME/.pegrc contains entries which allow the user to set the color and font styles - bold, italic, or underline of the auto parameters, hidden parameters, or both.

Resource name Description Value
display.tooltips display tooltips when cursor over widget true
display.prompts display parameter prompt when cursor over widget true
display.hidden show the hidden parameters true
clobber save overwrites an existing file true
auto.color color name or '#rrggbb' for auto params (i.e. red or #ff0000)
hidden.color color name or '#rrggbb' for hidden params (i.e. blue or #0000ff)
auto.markup font style for auto params - combination of b|u|i for bold|underline|italic i
hidden.markup font style for auto params - combination of b|u|i for bold|underline|italic

Users may modify the resource values directly in their $HOME/.pegrc resource file or they may edit the values through the Preferences option in PEG's Edit pulldown menu. Changes made to the GUI do not get written out to the user's local resource file unless the user explicitly clicks on the save button. To see all resource value changes, the user generally needs to reload the parameter file they are editing.

Example 1


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 /tmp/dmcopy.par

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


There are no known bugs for this tool.

See Also

analysis-menu, gui, prism, taskmonitor

Last modified: December 2013
Smithsonian Institute Smithsonian Institute

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