listtra


This task lists the single column of a trailer  table to a simple ASCII file or stdout. It is designed to make it easier to scan trailers using a script or interactively.

The command takes one required argument (a filespec matching one or more FITS files) and one optional argument (the name of an output directory OR a qualifier and the name of an output file OR the qualifier for stdout). If the second argument is not provided, the name of each output file will be the same as each input file with the extension changed to .tlis, and the output directory set to the current working directory.

Usage:

> listtra input_filespec [output_directory | -f output_filespec | -s]

Context

 

Inputs

            The input is a filespec for one or more trailer FITS files. Any path can be provided. Wildcards are supported.

 

Outputs

The output consists of ASCII text for each input file containing each line of the trailer.

Examples

> listtra

            This example will display the command syntax.

> listtra /directory/data1/o3s40705m_tra.fits

This example will produce a file called o3s40705m_tra.tlis in the current working directory.

> listtra /directory/rawdata/*_tra.fits

This example will produce output files called *_tra.tlis in the current working directory for each FITS trailer matching the filespec provided.

> listtra *_tra.fits $tra_dump_dir

This example will produce output files called *_tra.tlis, one for each FITS trailer in the current directory. The output files will be written to the directory defined by the variable name tra_dump_dir.

> listtra o3s40705m_tra.fits -f $mydir/tra.lis

This example will produce a file called tra.lis in the directory specified by the variable name mydir.

> listtra o3s40705m_tra.fits -s

This example will send the trailer text to stdout where it can be observed interactively or piped to another process.