[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

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


MKHDR Source code in mkhdr.pro

MKHDR

Name
       MKHDR
Purpose
       Make a minimal primary (or IMAGE extension) FITS header
Explanation
       If an array is supplied,  then the created FITS header will be
       appropriate to the supplied array.  Otherwise, the user can specify
       the dimensions and datatype.
Calling Sequence
       MKHDR, header                   ;Prompt for image size and type
               or
       MKHDR, header, im, [ /IMAGE, /EXTEND ]
               or
       MKHDR, header, type, naxisx, [/IMAGE, /EXTEND ]
Optional Input Parameters
       IM - If IM is a vector or array then the header will be made
               appropriate to the size and type of IM.  IM does not have
               to be the actual data; it can be a dummy array of the same
               type and size as the data.    Set IM = '' to create a dummy
               header with NAXIS = 0.
       TYPE - If more than 2 parameters are supplied, then the second parameter
               is interpreted as an integer giving the IDL datatype e.g.
               1 - LOGICAL*1, 2 - INTEGER*2, 4 - REAL*4, 3 - INTEGER*4
       NAXISX - Vector giving the size of each dimension (NAXIS1, NAXIS2,
               etc.).
Output Parameters
       HEADER - image header, (string array) with required keywords
               BITPIX, NAXIS, NAXIS1, ... Further keywords can be added
               to the header with SXADDPAR.
Optional Input Keywords
       /IMAGE   = If set, then a minimal header for a FITS IMAGE extension
               is created.    An IMAGE extension header is identical to
               a primary FITS header except the first keyword is
               'XTENSION' = 'IMAGE' instead of 'SIMPLE  ' = 'T'
       /EXTEND  = If set, then the keyword EXTEND is inserted into the file,
               with the value of "T" (true).    The EXTEND keyword must be
               included in a primary header, if the FITS file contains
               extensions.
Restrictions
       (1)  MKHDR should not be used to make an STSDAS header or a FITS
               ASCII or Binary Table extension header.   Instead use
               SXHMAKE - to create a minimal STSDAS header
               FXBHMAKE - to create a minimal FITS binary table header
               FTCREATE - to create a minimal FITS ASCII table header
       (2)  Any data already in the header before calling MKHDR
               will be destroyed.
Example
       Create a minimal FITS header, Hdr, for a 30 x 40 x 50 INTEGER*2 array
             IDL> mkhdr, Hdr, 2, [30,40,50]
       Alternatively, if the array already exists as an IDL variable, Array,
              IDL> mkhdr, Hdr, Array
Procedures Used
       SXADDPAR, GET_DATE
Revision History
       Written November, 1988               W. Landsman
       May, 1990, Adapted for IDL Version 2.0, J. Isensee
       Aug, 1997, Use SYSTIME(), new DATE format  W. Landsman
       Converted to IDL V5.0   W. Landsman   September 1997
       Allow unsigned data types    W. Landsman   December 1999
       Set BZERO = 0 for unsigned integer data  W. Landsman January 2000
       EXTEND keyword must immediately follow last NAXISi W. Landsman Sep 2000
       Add FITS definition COMMENT to primary headers W. Landsman Oct. 2001
       Allow (nonstandard) 64 bit integers   W. Landsman  Feb. 2003

Last modified by pro2html on 2003 July 28 at 03:44 UTC

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

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