[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

Sand 1, D-72076 Tübingen, Germany
[Uni logo]


MRD_HREAD Source code in mrd_hread.pro

MRD_HREAD

Name
     MRD_HREAD
Purpose
     Reads a FITS header from an opened disk file or Unix pipe
Explanation
     Like FXHREAD but also works with compressed Unix files
Calling Sequence
     MRD_HREAD, UNIT, HEADER  [, STATUS, /SILENT ]
Input Parameters
     UNIT    = Logical unit number of an open FITS file
Output Parameters
     HEADER  = String array containing the FITS header.
Optional Output
     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).
Keyword Parameters
      /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.
Restrictions
      The file must already be positioned at the start of the header.  It
      must be a proper FITS file.
Side Effects
       The file ends by being positioned at the end of the FITS header, unless
       an error occurs.
Revision History
      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

Last modified by pro2html on 2003 February 27 at 04:40 UTC

[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]

Jörn Wilms (wilms@astro.uni-tuebingen.de)
Updated automatically