Introduction to Peg
[CIAO 3.4 Science Threads]
OverviewLast Update: 1 Dec 2006 - updated for CIAO 3.4: minor correction to screen output Synopsis: The Parameter Editor GUI (peg) is an application which allows the user to easily view and modify the values in a parameter file. The tool may then be run from peg, or the values can simply be saved for a future analysis session. |
Contents
- Getting Started
- Launching peg
- The Basic Display
- Running Tools
- The Command Line Box
- The Analysis Menu
- Closing peg
- Parameter files:
- History
- Images
Getting Started
For illustration, this thread utilizes the ObsID 1843 (ACIS-I, G21.5-0.9) data that was downloaded in the How to Download Chandra Data from the Archive thread.
If this is your first time using CIAO, please read the Starting CIAO thread to ensure that your environment is configured properly.
Like many other CIAO tools, peg has a parameter file that allows the user to set several preferences which are then used as the default value each time the tool is invoked. The file may be viewed with plist peg and the options are described in the ahelp file. All of these options may also be altered via the "Edit -> Preferences" menu; changes made in this menu are also updated in the parameter file.
Launching peg
There are several options for starting up peg, both from the command line and from the GUI itself:
-
Do not give any arguments:
unix% peg &
The editor is launched without any file loaded, as shown in Figure 1 . Open the desired parameter file via the "Open" dialog box from the "File" menu. A list of recently accessed files is maintained by peg and can be found in the "File -> Open List" submenu. This displays a list of (up to) the last 10 files viewed; selecting any of the files reloads it. Note that the path is considered part of the filename.
-
Specify a tool name:
unix% peg dmlist &
This loads the parameter file dmlist.par that is in the $PFILES path, either the user's local copy or, if that does not exist, the system default. The Parameter Files section of the Introduction to CIAO thread has information on this environment variable.
-
Specify a parameter file and (optional) path:
unix% peg /some/directory/dmlist.par &
This loads a specific copy of dmlist.par.
Once a file is loaded, the GUI will look like Figure 2 . Notice that the full path to the active parameter file - /soft/ciao/param/dmlist.par - is given just below the main window.
The Basic Display
The GUI contains three main sections: the parameter file window, the command execution panel, and a status window.
The top window shows all the parameters in the chosen parameter file; the names of the hidden parameters are shown in yellow. Any parameter that can take a file as input will have a "Browse" button next to the field, so that the desired file (and optional path) may be entered. Any parameters values currently set in the file will be loaded into the appropriate fields.
The command execution panel contains the "Command Line" box (described below) and six buttons:
-
Run & Exit: run the tool and exit peg.
-
Run: run the tool, but do not exit peg.
-
Save: save the updated parameter values.
-
Punlearn: reset all the entries to the default values; see ahelp punlearn for more information.
-
Tool Help: opens an xterm window and displays the help file for the current tool. Other help options are available from the "Help" menu.
-
Quit: exit peg.
The status window across the bottom of the application provides various feedback messages.
Running Tools
To run a tool from peg, simply set the desired parameters. In this case, shown in Figure 3 , we have set the following:
Click "Run" to launch the tool in the background. The status bar records the action:
Thu 01-Dec 14:06:16 executing tool- dmlist verbose=1 infile="peg_intro/acisf01843N001_evt2.fits" opt="data" outfile="" rows="1:5" cells="" mode="ql"
The taskmonitor GUI will be launched, displaying the command and any output from the tool. As seen in Figure 4 , the results of the run are given in the "Output" window. The "Status" window indicates that the tool finished successfully. Click "Exit" to close taskmonitor.
To run the same task on the command line:
unix% dmlist peg_intro/acisf01843N001_evt2.fits data rows=1:5 verbose=1
The Command Line Box
The "Command Line" box is part of the the command execution panel. 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. The alternative is to check the "Show Hidden Parameters" box under "Edit -> Preferences", scroll down in the parameter window to the clobber entry, and set the value to "yes". The former option is clearly more convenient and efficient.
The Analysis Menu
The "Analysis" menu allows you to launch other CIAO tools from within peg; see the Introduction to the Analysis Menu thread for more information.
Closing peg
Peg may be closed by choosing "Exit" from the "File" menu or by clicking the "Quit" button.
Parameters for /home/username/cxcds_param/peg.par #---------------------------------------------------------------------- # peg.par - Parameter Editor Gui Application Preferences File #---------------------------------------------------------------------- prompt = yes Display parameter prompts as tooltips showhidden = yes Display hidden parameters savewarn = yes Prompt to save changes before exiting/opening other file browse = yes Display Browse button for filename parameters pattern = *.fits Browse dialog's default filter pattern delay = 1000 Length of time (ms) count before displaying prompts duration = 5000 Length of time (ms) to display prompts textwidth = 40 Width of parameter text fields spacing = 10 Spacing offset (pixels) between entries verbose = 1 Detail level of status messages (mode = ql) |
History
22 Dec 2004 | reviewed for CIAO 3.2: no changes |
01 Dec 2005 | reviewed for CIAO 3.3: no changes |
01 Dec 2006 | updated for CIAO 3.4: minor correction to screen output |