next up previous contents
Next: Contact Information Up: The FITS Support Office Previous: Documents

6.1.3 Software and Test Files

  The FITS Support Office has developed a simple C program called headlist to read and list all the FITS headers in a file, including extension headers as well as the primary header. It reads the file from standard input and writes to standard output. This program is useful when presented with a new and unfamiliar file. It does not evaluate the file and is not guaranteed to work if there are serious errors in the file, for example, if the size of the data in an extension is not correctly described by the values of BITPIX, NAXIS, the NAXISn, PCOUNT, and GCOUNT.

The FITS Support Office has a software package written in C called the FITS Product Conformance Tester (FPCT), which validates conformance of primary HDUs to the FITS Standard. While limited to Basic FITS structures, its diagnostics are more descriptive than those of other packages; it is also more forgiving, as it attempts to continue past errors by making its best guess at what was intended rather than terminating on the first error. It is thus most useful for those new to FITS. The FPCT checks the primary header of a FITS file for the presence of all required keywords and their order. If it can retrieve information (values of BITPIX, NAXIS, and the NAXISn) needed to read the primary data array, and the data in the array are integer, it will, at the user's option, produce an output file containing array members selected by the user. If the header is in conformance, it will print a message to that effect. If the header is not in conformance, but the software has inferred a data description, it will print a warning that retrieval of the data array may not be correct, with an indication of the severity of the problem. If the FPCT has been unable to retrieve the information needed to read the primary data array, it will print a diagnostic with information about the header errors and stop.

Both packages are available in the software subdirectory of the FITS anonymous ftp directories described in section 6.1.1 or can be obtained electronically by request from the FITS Support Office. The FPCT is accompanied by an instructions file. Read this file before using the software.

The errtest subdirectory contains a number of primary HDUs designed for checking the ability of FITS readers to cope with the unexpected. It includes one that is in compliance with the standard and a number of others that are identical except for deliberately inserted errors in syntax. One is simply a text extract, to test the behavior of the FITS reader when confronted with such a file, as might occur if such a file were mistakenly retrieved instead of a FITS file. An aaareadme.doc file describes the contents of this subdirectory. These files must be retrieved in binary format if they are to work properly. Many Web browsers interpret FITS files as text by default.


next up previous contents
Next: Contact Information Up: The FITS Support Office Previous: Documents