FXHMAKE
Name
FXHMAKE
Purpose
Create a basic FITS header array.
Explanation
Creates a basic header array with all the required keywords. This
defines a basic structure which can then be added to or modified by
other routines.
Use
FXHMAKE, HEADER [, DATA ]
Inputs
None required.
Opt. Inputs :
DATA = IDL data array to be written to file. It must be in the
primary data unit unless the XTENSION keyword is supplied.
This array is used to determine the values of the BITPIX and
NAXIS, etc. keywords.
If not passed, then BITPIX is set to eight, NAXIS is set to
zero, and no NAXISnnn keywords are included in this
preliminary header.
Outputs
HEADER = String array containing FITS header.
Opt. Outputs:
None.
Keywords
INITIALIZE = If set, then the header is completely initialized, and any
previous entries are lost.
EXTEND = If set, then the keyword EXTEND is inserted into the file,
with the value of "T" (true).
DATE = If set, then the DATE keyword is added to the header.
ERRMSG = If defined and passed, then any error messages will be
returned to the user in this parameter rather than
depending on the MESSAGE routine in IDL. If no errors are
encountered, then a null string is returned. In order to
use this feature, ERRMSG must be defined first, e.g.
ERRMSG = ''
FXHMAKE, ERRMSG=ERRMSG, ...
IF ERRMSG NE '' THEN ...
XTENSION - If set, then the header is appropriate for an image
extension, rather than the primary data unit.
Calls
GET_DATE, FXADDPAR, FXHCLEAN
Common :
None.
Restrictions
Groups are not currently supported.
Side Effects
BITPIX, NAXIS, etc. are defined such that complex arrays are stored as
floating point, with an extra first dimension of two elements (real and
imaginary parts).
Category
Data Handling, I/O, FITS, Generic.
Prev. Hist. :
William Thompson, Jan 1992, from SXHMAKE by D. Lindler and M. Greason.
Differences include:
* Use of FITS standard (negative BITPIX) to signal floating
point numbers instead of (SDAS/Geis) DATATYPE keyword.
* Storage of complex numbers as pairs of real numbers.
* Support for EXTEND keyword, and for cases where there is no
primary data array.
* Insertion of DATE record made optional. Only required FITS
keywords are inserted automatically.
Written :
William Thompson, GSFC, January 1992.
Modified :
Version 1, William Thompson, GSFC, 12 April 1993.
Incorporated into CDS library.
Version 2, William Thompson, GSFC, 21 June 1994
Added ERRMSG keyword.
Version 3, William Thompson, GSFC, 23 June 1994
Modified so that ERRMSG is not touched if not defined.
Version 4, Wayne Landsman, GSFC, 12 August 1997
Recognize double complex data type
Converted to IDL V5.0 W. Landsman September 1997
Version 6, William Thompson, GSFC, 22 September 2004
Recognize unsigned integer types.
Version 6.1, C. Markwardt, GSFC, 19 Jun 2005
Add the XTENSION keyword, which writes an XTENSION
keyword instead of SIMPLE.
Version
Version 6.1, 19 June 2005