listhead


This task copies all the headers in a set of FITS files to a set of simple ASCII files, or to stdout.  It is designed to make it easier to look at the headers and to scan a FITS file for keywords.  The stdout output is useful for scripts or interactive viewing of a single file.

The command takes one required argument (the filemask for 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 .lis, and the output directory name changed to the current working directory.

Usage:

$ listhead input_filespec [output_directory | -f output_filespec | -s ]

 

Context

 

Inputs

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

 

Outputs

The output consists of text for each input FITS file containing all the keywords in the original FITS file. The primary header is listed as "extension 0", and each extension header follows. The extensions are identified with a banner line.

Examples

> listhead

This example will display the command syntax.

> listhead /directory/terrier/o3s40705m_raw.fits

This example will produce a file called o3s40705m_raw.lis in the current working directory.

> listhead /directory/dir_one/*_raw.fits

This example will produce files named *_raw.lis in the current working directory for each FITS file matching the filemask in the specified directory.

> listhead *.fits $n_dads_dir

This example will produce files named *.LIS for each FITS file matching the filemask in the current directory. The output files will be written to the directory defined by the variable n_dads_dir.

> listhead o3s40705m_raw.fits -f $mydir/raw.lis

This example will produce a file called raw.lis in the directory defined by the variable mydir.