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

AHELP for CIAO 4.9


Context: tools


Get parameter values


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


`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.


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
Qualifier Description
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).


There are no known bugs for this tool.

See Also

dmhistory, dmkeypar, dmmakepar, dmreadpar, paccess, pdump, pline, plist, pquery, pset, punlearn

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.