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/pget.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 3.4 pget Context: tools

Synopsis

Get parameter values

Syntax

pget [-abort] toolname parameter [ parameter2 ... ]

Description

`pget' gets the value of the specified parameter(s) from the given parameter file. All redirections and shell evaluations are performed.

Example 1

pget dmlist infile

Return the value of the infile parameter

Example 2

pget dmlist infile opt

Returns the value of the infile and opt parameters, one per line.

Example 3

pget dmlist infile.p_value

Will return the actual string stored in the parameter file for the value field of the parameter. Redirections and shell evaluations are NOT performed.

Example 4

pget -abort blah.par boo

The '-abort' option causes pget to exit with an error when a parameter file specifies an inappropriate value. For example, if blah.par contained

boo,i,h,notaninteger,,,"bad value"

the above command would exit with an error, rather than prompting for a valid value (as it would if '-abort' were not given). This can be useful in scripts, where prompting for a valid value could cause a script to hang indefinitely.

Parameters

name type ftype reqd
parameter_file string input yes
parameter string input yes
-abort notype    

Detailed Parameter Descriptions

Parameter=parameter_file (string required filetype=input)

Parameter file from which to retrieve data

Name (plus optional path) of parameter file to get values from

Parameter=parameter (string required filetype=input)

Name of parameter

Name of parameter to retrieve. Optionally can use the various parameter attributes listed below to return those values.

Parameter Attributes
p_mode Whether the parameter is prompted for or not
p_value The value of the parameter. If the parameter is a redirected, this returns the redirection string rather than what the redirection evaluates too.
p_min Minimum value allowed
p_max Maximum value allowed
p_prompt The parameter prompt

Parameter=-abort (notype)

Abort flag

If the parameter file contains an invalid value for the requested parameter, exit with an error (instead of prompting for a valid value).

Bugs

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.