[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

Sand 1, D-72076 Tübingen, Germany
New Address!   --   Neue Adresse!
[Uni logo]


FXADDPAR Source code in fxaddpar.pro

FXADDPAR

Name
       FXADDPAR
Purpose
       Add or modify a parameter in a FITS header array.
Explanation
       This version of FXADDPAR will write string values longer than 68
       characters using the FITS continuation convention described at
       http://heasarc.gsfc.nasa.gov/docs/heasarc/ofwg/docs/ofwg_recomm/r13.html
Calling Sequence
       FXADDPAR, HEADER, NAME, VALUE, COMMENT
Input Parameters
       HEADER  = String array containing FITS header.  The maximum string
                 length must be equal to 80.  If not defined, then FXADDPAR
                 will create an empty FITS header array.
       NAME    = Name of parameter.  If NAME is already in the header the
                 value and possibly comment fields are modified. Otherwise a
                 new record is added to the header.  If NAME is equal to
                 either "COMMENT" or "HISTORY" then the value will be added to
                 the record without replacement.  In this case the comment
                 parameter is ignored.
       VALUE   = Value for parameter.  The value expression must be of the
                 correct type, e.g. integer, floating or string.
                 String values of 'T' or 'F' are considered logical
                 values.  If the value is a string and is "long"
                 (more than 69 characters), then it may be continued
                 over more than one line using the OGIP CONTINUE
                 standard.
Optional Input Parameters
       COMMENT = String field.  The '/' is added by this routine.  Added
                 starting in position 31.  If not supplied, or set equal to ''
                 (the null string), then any previous comment field in the
                 header for that keyword is retained (when found).
Output Parameters
       HEADER  = Updated header array.
Optional Output
       None.
Keyword Parameters
       BEFORE  = Keyword string name.  The parameter will be placed before the
                 location of this keyword.  For example, if BEFORE='HISTORY'
                 then the parameter will be placed before the first history
                 location.  This applies only when adding a new keyword;
                 keywords already in the header are kept in the same position.
       AFTER   = Same as BEFORE, but the parameter will be placed after the
                 location of this keyword.  This keyword takes precedence over
                 BEFORE.
       FORMAT  = Specifies FORTRAN-like format for parameter, e.g. "F7.3".  A
                 scalar string should be used.  For complex numbers the format
                 should be defined so that it can be applied separately to the
                 real and imaginary parts.
       /NOCONTINUE = By default, FXADDPAR will break strings longer than 68
                characters into multiple lines using the continuation
                convention.    If this keyword is set, then the line will
                instead be truncated to 68 characters.    This was the default
                behaviour of FXADDPAR prior to December 1999.
Procedures Used
       DETABIFY(), FXPAR(), FXPARPOS()
Common Blocks
       None.
Restrictions
       Warning -- Parameters and names are not checked against valid FITS
       parameter names, values and types.
       The required FITS keywords SIMPLE (or XTENSION), BITPIX, NAXIS, NAXIS1,
       NAXIS2, etc., must be entered in order.  The actual values of these
       keywords are not checked for legality and consistency, however.
Side Effects
       All HISTORY records are inserted in order at the end of the header.
       All COMMENT records are also inserted in order at the end of the
       header, but before the HISTORY records.  The BEFORE and AFTER keywords
       can override this.
       All records with no keyword (blank) are inserted in order at the end of
       the header, but before the COMMENT and HISTORY records.  The BEFORE and
       AFTER keywords can override this.
       All other records are inserted before any of the HISTORY, COMMENT, or
       "blank" records.  The BEFORE and AFTER keywords can override this.
       String values longer than 68 characters will be split into multiple
       lines using the OGIP CONTINUE convention, unless the /NOCONTINUE keyword
       is set.    For a description of the CONTINUE convention see
       http://heasarc.gsfc.nasa.gov/docs/heasarc/ofwg/docs/ofwg_recomm/r13.htm
Category
       Data Handling, I/O, FITS, Generic.
History
       William Thompson, Jan 1992, from SXADDPAR by D. Lindler and J. Isensee.
       Differences include:
               * LOCATION parameter replaced with keywords BEFORE and AFTER.
               * Support for COMMENT and "blank" FITS keywords.
               * Better support for standard FITS formatting of string and
                 complex values.
               * Built-in knowledge of the proper position of required
                 keywords in FITS (although not necessarily SDAS/Geis) primary
                 headers, and in TABLE and BINTABLE extension headers.
       William Thompson, May 1992, fixed bug when extending length of header,
       and new record is COMMENT, HISTORY, or blank.
Author
       William Thompson, GSFC, January 1992.
Revision History
       Version 1, William Thompson, GSFC, 12 April 1993.
               Incorporated into CDS library.
       Version 2, William Thompson, GSFC, 5 September 1997
               Fixed bug replacing strings that contain "/" character--it
               interpreted the following characters as a comment.
       Version 3, Craig Markwardt, GSFC,  December 1997
               Allow long values to extend over multiple lines
       Version 4, D. Lindler, March 2000, modified to use capital E instead
               of a lower case e for exponential format.
       Version 4.1 W. Landsman April 2000, make user-supplied format uppercase
       Version 4.2 W. Landsman July 2002, positioning of EXTEND keyword
Version
       Version 4.2, July 2002

Last modified by pro2html on 2002 July 26 at 03:34 UTC

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

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