Subject: VERIFITS program

From: William Pence <pence at tetra.gsfc.nasa.gov>
Date: Wed, 9 Nov 1994 18:21:45 -0500

VERIFITS - A Program to Verify Any FITS File

This is to announce that a new program called VERIFITS is available for
verifying the integrity of any FITS format data file on magnetic disk.
VERIFITS will read any FITS file and will check that all the keywords
and data conform to the requirements given in the NOST FITS format
Standard.  It also issues warnings about other conditions that may
indicate a problem even though they are allowed within the Standard
(such as duplicate keywords).

The goal in designing VERIFITS was to make it capable of verifying any
FITS format file and have it detect any and all deviations from the
FITS Standard (as defined in the NASA/NOST document).  A list of all
the checks performed by VERIFITS is given below.  VERIFITS has been
extensively tested, but there may still be cases in which it does not
detect a FITS format error, or it issues an error message that does not
accurately describe the real problem.  Please send me a description of
any such cases so that the next version of the program can be
improved.

VERIFITS is available via anonymous ftp from legacy.gsfc.nasa.gov in
the /software/fitsio/verifits directory.  For convenience, several
different binary executable versions of the program are available, for
running on SUN workstations, DECstations, DEC Alphas running OSF/1 or
VAX/VMS machines.  The VERIFITS source code is also provided and may be
easily linked with the FITSIO library (available in /software/fitsio)
to run on any other type of machine.

The VERIFITS program is actually a stand alone version of the fverify
task that is included in the IRAF or Host FTOOLS package that also
contains many other FITS file utilities.  Both VERIFITS and fverify
perform the same verification checks, but fverify has a nicer user
interface, as provided by the IRAF or Host environments.  See the files
in the /software/ftools/release directory for more information about
FTOOLS.

DESCRIPTION OF THE CHECKS PERFORMED BY VERIFITS

VERIFITS goes though the following sequence of steps to verify
any FITS file.  These steps are repeated for every FITS extension
in the file until the end of file is detected.

 - Read all the required keywords and check that they are in the correct
   order and have legal values.

 - Read and parse any remaining keywords in the header to ensure
   that they conform to the required FITS syntax.

 - Issue a warning if there are duplicate keywords, excluding
   keywords like COMMENT and HISTORY.  

 - Issue a warning if there are any keywords without an '= ' in
   column 9-10 (i.e., have no value field).  This excludes keywords
   like COMMENT and HISTORY.

 - Check that the fill bytes following the END keyword are filled
   with ASCII spaces.

 - Read all the data values and compute the minimum and maximum values
   as well as the number of undefined values.  In the case of 'Random
   Groups' FITS files, each group is checked separately.  In the case
   of ASCII or Binary table extensions, the minimum and maximum in
   each column is computed separately. This option may be turned off to 
   make the program run faster.

 - Check that any fill bytes following the data are initialized 
   correctly.

 - Check for any extra bytes of data in the file following the last 
   FITS extension.  This may indicate the presence of 'Special Records'
   at the end of the FITS file.

VERIFITS generates a report summarizing the contents of the FITS file
including a listing of any error or warning messages.  The report may
optionally include a listing of all the header keywords if desired.

Please report any questions or problems regarding this program to:

Bill Pence
pence at tetra.gsfc.nasa.gov
HEASARC, NASA/GSFC