>  Docs Center  >  Libraries  >  ASTROLIB  >  FITS_ADD_CHECKSUM
Libraries

FITS_ADD_CHECKSUM

FITS_ADD_CHECKSUM

Name


    FITS_ADD_CHECKSUM

Purpose


    Add or update the CHECKSUM and DATASUM keywords in a FITS header

Explanation


    Follows the 23 May 2002 version of the FITS checksum proposal at
    http://heasarc.gsfc.nasa.gov/docs/heasarc/fits/checksum.html

Calling Sequence


    FITS_ADD_CHECKSUM, Hdr, [ Data, /No_TIMESTAMP, /FROM_IEEE ]

Input-output


    Hdr - FITS header (string array), it will be updated with new
          (or modfied) CHECKSUM and DATASUM keywords

Optional Input


    Data - data array associated with the FITS header. If not supplied, or
          set to a scalar, then the program checks whether there is a
          DATASUM keyword already in the FITS header containing the 32bit
          checksum for the data. if there is no such keyword then there
          assumed to be no data array associated with the FITS header.

Optional Input Keywords


    /FROM_IEEE - If this keyword is set, then the input is assumed to be in
            big endian format (e.g. an untranslated FITS array). This
            keyword only has an effect on little endian machines (e.g.
            a Linux box).
    /No_TIMESTAMP - If set, then a time stamp is not included in the comment
            field of the CHECKSUM and DATASUM keywords. Unless the
            /No_TIMESTAMP keyword is set, repeated calls to FITS_ADD_CHECKSUM
            with the same header and data will yield different values of
            CHECKSUM (as the date stamp always changes). However, use of the
            date stamp is recommended in the checksum proposal.

Procedures Used


    CHECKSUM32, FITS_ASCII_ENCODE(), GET_DATE, SXADDPAR, SXPAR()

Revision History


    W. Landsman SSAI December 2002
    Fix problem with images with a multiple of 2880 bytes. W.L. May 2008
    Avoid conversion error when DATASUM is an empty string W.L. June 2008
    Don't update DATASUM if not already present and no data array supplied
                      W.L. July 2008
    Make sure input header array has 80 chars/line W.L. Aug 2009



© 2024 NV5 Geospatial Solutions, Inc. |  Legal
   Contact Us