next up previous 78
Next: Prompted parameters
Up: Parameters: Controlling commands
Previous: What is the parameter system?


Parameters on the command line

There are three useful keywords the user can give on the command line to control the defaulting and prompting:

The user is not prompted for a parameter value in all circumstances, but a value can be specified on the command line even if it would not be prompted for. Conversely, if a parameter is given on the command line, then it will not be prompted for.

On the command line, parameters can be specified by position or by name. To specify by position, they must be in the right order and all previous positions must be filled, too. E.g. for a spectrum in `a_file.sdf' the following will work:

   ICL> istat image=a_file xstart=min xend=max
   ICL> istat a_file xstart=min xend=max
   ICL> istat a_file min max min max

In the third version, the first pair `min max' is for parameters 2 and 3, `ystart' and `yend'. Although these are not needed for a spectrum, positions 2 and 3 must be filled in order to use positions 4 and 5 for `xstart' and `xend'.

Logical parameters usually do not have positions assigned to them. On the other hand, these can be specified by name and value, or by negated name. Consider the `median' parameter of the command `istat'. There are two ways to set it true, and two ways to set it false:

   ICL> istat median=true
   ICL> istat median
   ICL> istat median=false
   ICL> istat nomedian

Furthermore, instead of `true', `yes', `t', or `y' can be used, similarly with `false' and `no'.

There are a few vector parameters in Figaro, where the parameter value is not a single number but a vector of numbers. To specify vector values, use square brackets such as

   ICL> creobj dims=[5,24,3] ...

If you set the environment variable ADAM_ABBRV, you can abbreviate the parameter names on your command line to the shortest unambiguous string. Say `istat' has only one parameter beginning with `i'. Therefore `i=a_file' is just as well as `image=a_file'.



next up previous 78
Next: Prompted parameters
Up: Parameters: Controlling commands
Previous: What is the parameter system?

FIGARO A general data reduction system
Starlink User Note 86
Keith Shortridge, Horst Meyerdierks,
Malcolm Currie, Martin Clayton, Jon Lockley,
Anne Charles, Clive Davenhall,
Mark Taylor, Tim Ash, Tim Wilkins, Dave Axon,
John Palmer, Anthony Holloway and
Vito Graffagnino
2004 February 17
E-mail:ussc@star.rl.ac.uk

Copyright © 2008 Science and Technology Facilities Council