When a KAPPA application requests an input or output data file (either an NDF or a positions list), you may optionally give a group of several data files rather than just one. In this case, the application is automatically re-run until all the supplied data files have been processed. For instance, in the following command:
% display in="../a*" mode=perc accept
a group of NDFs (all those beginning with ``a'' in the parent directory) are assigned to the IN parameter, and the DISPLAY command is automatically re-run to display each NDF in the fashion of a (rather slow!) movie.
Another example:
% stats ndf=^files
will display the pixel statistics of all NDFs listed within the text file
files. The ``^'' character indicates that the following
string (files) is not the name of an NDF, but the name of a text
file from which NDF names should be read.
% wcsframe '"image_a,image_b,image_c"' sky
This will set the current co-ordinate Frame for the three NDFs
image_a, image_b and image_c so that celestial sky
co-ordinates are used to refer to positions within the NDFs, if possible.
% cursor outcat="'first,^list_names'"
This will run CURSOR several times, allowing you
to select display positions using a cursor. On the first invocation,
the selected positions are written to a positions list stored in file
first.FIT. Positions selected on subsequent invocations are
written to positions lists with names read from the text file
list_names. Finally, if this CURSOR command is followed by:
% listshow accept
LISTSHOW will display the contents of all the catalogues created previously by CURSOR.
If an application has more than one NDF or positions list parameter, each
parameter should be given the same number of values (i.e. data
files). A warning is issued if any parameter is given too many values, but
processing continues normally until the smallest group is exhausted. For
instance, the following example adds NDF a1 to a2, and
b1 to b2, putting the results in a3 and b3:
% add in1="'a1,b1'" in2="'a2,b2'" out="'a3,b3'"
If (say) an extra NDF had been specified for Parameter IN2, the application would have been invoked twice to process the first two pairs, and then a warning message would have been displayed saying that too many NDFs were specified for Parameter IN2.
There is a special case in which this rule does not apply. If only a single value is given for an data file parameter, the same value is used repeatedly on all invocations of the application. So, for instance, if a single NDF had been given for Parameter IN2 in the above ADD example, the application would have again been run twice, using the same NDF for Parameter IN2 on each invocation.
The OUT parameter in the above example could alternatively have been
specified as out="'*|1|3|'". Here, the asterisk (*) represents the
base-names, a1 and b1, of the NDFs supplied for the first
NDF parameter to be accessed (IN1). The following string, |1|3|,
means replace all occurrences of 1 with 3, thus giving the final NDF
names a3 and b3.
KAPPA --- Kernel Application Package