Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


  >  Docs Center  >  Libraries  >  ASTROLIB  >  FITS_ASCII_ENCODE

FITS_ASCII_ENCODE

FITS_ASCII_ENCODE

Name


    FITS_ASCII_ENCODE()

Purpose


    Encode an unsigned longword as an ASCII string to insert in a FITS header

Explanation


    Follows the July 2007 version of the FITS checksum proposal at
      http://fits.gsfc.nasa.gov/registry/checksum.html

Calling Sequence


    result = FITS_ASCII_ENCODE( sum32)

Inputs


    sum32 - 32bit *unsigned longword* (e.g. as returned by CHECKSUM32)

Result


    A 16 character scalar string suitable for the CHECKSUM keyword

Example


      A FITS header/data unit has a checksum of 868229149. Encode the
      complement of this value (3426738146) into an ASCII string
      IDL> print,FITS_ASCII_ENCODE(3426738146U)
          ===> "hcHjjc9ghcEghc9g"

Method


      The 32bit value is interpreted as a sequence of 4 unsigned 8 bit
      integers, and divided by 4. Add an offset of 48b (ASCII '0').
      Remove non-alphanumeric ASCII characters (byte values 58-64 and 91-96)
      by simultaneously incrementing and decrementing the values in pairs.
      Cyclicly shift the string one place to the right.
                 

Revision History


    Written W. Landsman SSAI December 2002
    Use V6.0 notation W.L. August 2013



© 2018 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us