FITSEXIST

Inquires whether or not a keyword exists in a FITS extension

Description:

This application reports whether or not a keyword exists in the FITS extension of an NDF  file.

Usage:

fitsexist ndf keyword

Parameters:

KEYWORD = LITERAL (Read)
The name of the keyword whose existence in the FITS extension is to be tested. A name may be compound to handle hierarchical keywords, and it has the form keyword1.keyword2.keyword3 etc. The maximum number of keywords per FITS  card is 20. Each keyword must be no longer than 8 characters, and be a valid FITS keyword comprising only alphanumeric characters, hyphen, and underscore. Any lowercase letters are converted to uppercase and blanks are removed before comparison with the existing keywords.

KEYWORD may have an occurrence specified in brackets [] following the name. This enables testing for the existence of multiple occurrences. Note that it is not normal to have multiple occurrences of a keyword in a FITS header, unless it is blank, COMMENT or HISTORY. Any text between the brackets other than a positive integer is interpreted as the first occurrence.

The suggested value is the current value.

NDF = NDF (Read)
The NDF to be tested for the presence of the FITS keyword.

Results Parameters

EXISTS = _LOGICAL (Write)
The result of the final existence test.

Examples:

fitsexist abc bscale
This reports TRUE or FALSE depending on whether or not the FITS keyword BSCALE exists in the FITS extension of the NDF called abc.
fitsexist ndf=abc keyword=date[2]
This reports TRUE or FALSE depending on whether or not the FITS there are at least two occurrences of the keyword DATE.

Related Applications

KAPPA: FITSEDIT, FITSHEAD, FITSLIST, FITSMOD, FITSVAL.