![]() |
Institut für Astronomie und AstrophysikAbteilung AstronomieSand 1, D-72076 Tübingen, Germany |
![]() |
MRD_HREAD
Reads a FITS header from an opened disk file or Unix pipe
Like FXHREAD but also works with compressed Unix files
MRD_HREAD, UNIT, HEADER [, STATUS, /SILENT ]
UNIT = Logical unit number of an open FITS file
HEADER = String array containing the FITS header.
STATUS = Condition code giving the status of the read. Normally, this
is zero, but is set to -1 if an error occurs, or if the
first byte of the header is zero (ASCII null).
/SILENT - If set, then warning messages about any invalid characters in
the header are suppressed.
/FIRSTBLOCK - If set, then only the first block (36 lines or less) of
the FITS header are read into the output variable. If only
size information (e.g. BITPIX, NAXIS) is needed from the
header, then the use of this keyword can save time. The
file pointer is still positioned at the end of the header,
even if the /FIRSTBLOCK keyword is supplied.
The file must already be positioned at the start of the header. It
must be a proper FITS file.
The file ends by being positioned at the end of the FITS header, unless
an error occurs.
Written, Thomas McGlynn August 1995
Modified, Thomas McGlynn January 1996
Changed MRD_HREAD to handle Headers which have null characters
A warning message is printed out but the program continues.
Previously MRD_HREAD would fail if the null characters were
not in the last 2880 byte block of the header. Note that
such characters are illegal in the header but frequently
are produced by poor FITS writers.
Converted to IDL V5.0 W. Landsman September 1997
Added /SILENT keyword W. Landsman December 2000
Added /FIRSTBLOCK keyword W. Landsman February 2003
[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]