Convert SCUBA-2 MCE header information to TST format

Description:

Reads a set of SCUBA-2 files and writes catalogues of the mcehead information to files. The output files are in TST format and can be read into the TOPCAT application (but may require that TOPCAT is told explicitly that the catalogue is in TST format, e.g. with the -f tst command line option).

Multiple output files are created since the data are stored with different dimensionality. The root name for the output files can be specified using the $-$out parameter (default: uses the s??ddmmyyyy_nnnnn part of the input file name or the basename of the filename if different).

Output files (suffix: tst) are as follows:

• _gen:

parameters that have a single value (includes the 10 values for psc_status_psc which don’t fit the scheme)

• _crd:

parameters that have 4 values

• _col:

parameters that have 32 values (includes parameters that have 8 values since they always come in sets of 4).

• _row:

parameters that have 41 values

If $-$out is used to specify the root output file name, out from all input files will be concatinated into a single set of output files.

Parameters:

$-$help
Print help information.
$-$version
Print version information.
$-$man
Print the full documentation to STDOUT.
$-$out
Optional root name for the output files.
$-$items
Optional comma-separated list of header items to print. Instead a filename listing the item names can be given as -item=f̂ile. The format of the file is the desired list of item names with one item per line.

Notes:

For SCUBA-2 raw files, the program will only process the first file of any observation and skip all others. This is because the MCE configuration is only updated at the start of an observation. Assuming there are 10 observations for the night:

mcehead2cat /jcmtdata/raw/scuba2/s4a/20110524/*/*.sdf

will only process 10 files, not all x-nr sdf files that may be there. It will produce 10 sets of output files unless $-$out has been specified, in which case the mceheaders from the 10 files will be written to a single set of output files.