Next: fits_read, Previous: fits_header, Up: Internal Routines [Contents][Index]
fits_key(file, key [, /comment])
Returns the comment (if /comment
is specified) or the value
associated with string key
in the FITS header of the
indicated FITS or fz file
. (If the file is an fz file,
then it must have a FITS header to be accepted.) file
may
be a string, which is taken as the name of the FITS file, or a number,
which is taken as the number of the logical unit on which the FITS file
is already open. The following conditions generate an error: (1)
file
is not a string or a number, (2) the logical unit
number is illegal, (3) no file is open on the indicated logical unit,
(4) the file cannot be opened for reading, (5) the file does not have
"simple " as the first word of its header, (6) key
is not a
string, (7) key
has more than 8 characters. You may
specify key
in mixed upper and lower case: a copy with all
upper case will be compared against the key words in the FITS header.
If the key is not found in the FITS header, then a zero is returned.