next up previous contents
Next: Visualizing FITS Tables Up: ISAAC FITS Information Previous: ISAAC FITS Information

Extracting FITS Information

There are many tools to extract and parse FITS headers. One convenient way of extracting FITS information and displaying it on a terminal or re-directing it to a text file, is to use two stand-alone programs called dfits and fitsort. Both are included into the eclipse distribution.

dfits dumps a FITS header on stdout. You can use it to dump the FITS headers of many files, to allow the parsing of the output. Example:

% dfits *.fits | grep "TPL ID"

Usually, you want to get the value of a list of given FITS keywords in a list of FITS files. fitsort reads the output from dfits, classifies the keywords into columns, and prints out in a readable format the keyword values and file names. Example:

% dfits *.fits | fitsort NAXIS1 NAXIS2 BITPIX

fitsort also understands the shortFITS notation, where e.g. HIERARCH ESO TPL ID is shortened to TPL.ID. A classification example could be (both commands are equivalent, since fitsort is case-insensitive):

% dfits *.fits | fitsort TPL.ID DPR.TYPE
% dfits *.fits | fitsort tpl.id dpr.type

The output from this combination is something like:

FILE                                    TPL.ID                  DPR.TYPE
ISAAC.1999-04-09T19:16:32.047.fits      ISAACSW_img_cal_Darks   DARK
ISAAC.1999-04-09T19:56:51.011.fits      ISAACSW_img_cal_Darks   DARK
ISAAC.1999-04-09T20:37:09.058.fits      ISAACSW_img_cal_Darks   DARK
ISAAC.1999-04-09T21:00:49.003.fits      ISAACSW_img_cal_Darks   DARK
ISAAC.1999-04-09T21:24:27.081.fits      ISAACSW_img_cal_Darks   DARK
ISAAC.1999-04-09T21:37:26.086.fits      ISAACSW_img_cal_Darks   DARK

This kind of table is useful in getting an idea of what is present in a directory or list of directories. Loading such a summary table into a spreadsheet program also makes it conveniently readable.


next up previous contents
Next: Visualizing FITS Tables Up: ISAAC FITS Information Previous: ISAAC FITS Information
Christopher Lidman
2002-01-30