Parameter Files
All commands in XIMAGE which use the syntax "command
parameter=value" require a parameter file. These files bear the
extension .par and are located in
$XANADU/image/ximage/pfiles
Parameter files are of the following format:
Source: newcmd.par
#
# Parameters for newcmd
#
logpar,b,a,no,,,"Logical parameter[y/n]?"
strpar,s,a,,,,"String parameter"
intpar,i,a,,,,"Integer parameter"
realpar,r,a,,,,"Real parameter"
dblpar,r,a,,,,"Double parameter"
listpar,s,a,,,,"List parameter"
#mode,s,h,"h",,,""
Note that parameter files use 'b' for boolean rather than 'l' for
logical. Also, internally 'r' parameters are stored as doubles.
The usage of GPARR and GPARD just determines what type you would like
returned in FORTRAN.
Also, there is a special type which allows the retrieval of a list
of real numbers delimited by spaces. In the parameter file,
the string type is used, however, when GPARLR is called from FORTRAN,
an array of reals is returned.
If you are familiar with parameter files, the default behavior of 'a'
mode is 'h' or hidden mode. It is possible to make parameters behave
similar to ftool arguments by giving them a 'q' mode. Each 'q'
parameter will claim free arguments in the order that they appear
in the parameter file. For example,
#
# Parameters for othercmd
#
infile,s,q,,,,"Input file"
outfile,s,q,,,,"Output file"
mode,i,a,,,,"Mode"
The following are equivalent:
othercmd mode=1 data.fits result.fits
othercmd mode=1 infile=data.fits outfile=result.fits
Unlike ftools, parameters are never queried or learned. Also, notice
that the mode parameter doesn't have any special meaning like in ftools
where 'a' modes are replaced with the value for the mode parameter.
This was done because an existing command had a 'mode' parameter, and
that behavior was unnecessary for ximage anyway.
Please send reports of errors to :