NAME

ofverify -- Verify that a FITS file conforms to the FITS Standard.


USAGE

        ofverify filename

DESCRIPTION

This task reads a FITS file and verifies that the header and data in the primary array and in every extension conform to the FITS format standard. It first reads the required header keywords to check that they are in the correct order and have legal values. Then all the remaining header keywords are read to verify that they conform to the FITS syntax rules. This includes testing for illegal characters in the keyword names (only A-Z, 0-9, hyphen and underscore allowed) or in the value and comment fields (any ASCII 'text' character is allowed). The value field is parsed to verify that it is a valid FITS datatype (a quoted string, and integer, a floating point value, or a boolean T or F value). A warning message is printed if any duplicate keywords are found (except for COMMENT, and HISTORY and other comment-type keywords that do not have an '= ' in columns 9 and 10) . Finally, any fill characters after the END keyword are checked to be sure that they are all blanks (ASCII 32).

If the TESTDATA option is set, then OFVERIFY next attempts to read all the data values. For primary arrays and image extensions it computes and displays the minimum and maximum data value and also counts the number of pixels that are undefined (i.e., are set to the null value). For Random Group FITS files this information is calculated for each group separately. For ASCII or binary table extensions, each column is read individually and the minimum and maximum values and the number of undefined values are calculated. Ofverify supports both fixed-length and variable-length vector columns in binary tables,

Finally, OFVERIFY checks that any fill bytes at the end of the data have a valid value (i.e., must equal zero except for ASCII tables which must be filled with ASCII blanks).

Every extension in the FITS file is checked in turn until the end of file is detected.

NOTE: OFVERIFY also used to check whether there were any extraneous bytes in the file following the last valid HDU, but this check was disabled for technical reasons in July 2000.

OFVERIFY prints a summary table to the terminal (or to an optional output file) showing the structure of the FITS file and a description of any errors that it finds. Optionally, all the header keywords may also be printed.


PARAMETERS

infile [file name]
Name of the FITS file to be verified.

outfile [file name]
Name of optional output file to write the verification report. If outfile is blank or = 'STDOUT' then the results will be written to the standard output device (usually the user's terminal) rather than to a file. If preceeded by a !, an existing file of the same name will be overwritten.

(prhead = no) [boolean]
Should the header keywords be printed to the output file?

(testdata = yes) [boolean]
Should every data value be read and verified? Turning this option off greatly increases the execution speed of the task at the expense of doing a less rigorous verification of the FITS file. Only the header keywords and the data fill values will be checked if testdata = no.

(clobber = no) [boolean]
If true, a file of the same name as the requested output file will be overwritten.


EXAMPLES

1. Verify the contents of the FITS file 'test.fits':

          
                  ft> ofverify test.fits

2. Verify the FITS file 'test.fits' and print all the header keywords:

          
                  ft> ofverify test.fits prhead=yes


BUGS


SEE ALSO

fstruct, flcol, fdump, fimgdmp

CATEGORY

Jun94 ftools.futils