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


  >  Docs Center  >  Libraries  >  ASTROLIB  >  HOST_TO_IEEE

HOST_TO_IEEE

HOST_TO_IEEE

Name


    HOST_TO_IEEE

Purpose


    Translate an IDL variable from host to IEEE representation

Explanation


    The variable is converted from the format used by the host architecture
    into IEEE-754 representation ("big endian" as used, e.g., in FITS data ).
    Duplicates most of the functionality of the SWAP_ENDIAN_INPLACE procedure
    with the addition of the IDLTYPE keyword.

Calling Sequence


    HOST_TO_IEEE, data, [ IDLTYPE = ]
  INPUT-OUTPUT PARAMETERS:
    data - any IDL variable, scalar or vector. It will be modified by
            HOST_TO_IEEE to convert from host to IEEE representation. Byte
            and string variables are returned by HOST_TO_IEEE unchanged

Optional Keyword Inputs


    IDLTYPE - scalar integer (1-15) specifying the IDL datatype according
              to the code given by the SIZE function. This keyword
              will usually be used when supplying a byte array that needs
              to be interpreted as another data type (e.g. FLOAT).

Example


    Suppose FITARR is a 2880 element byte array to be converted to a FITS
    record and interpreted a FLOAT data.
      IDL> host_to_ieee, FITARR, IDLTYPE = 4

Method


    The BYTEORDER procedure is called with the appropriate keywords

Modification History


      Adapted from CONV_UNIX_VAX, W. Landsman Hughes/STX January, 1992
      Added new integer datatypes C. Markwardt/W. Landsman July 2000
      Use /SWAP_IF_LITTLE_ENDIAN keyword for 64bit types W. Landsman Feb 2003
      Do not use XDR keywords to BYTEORDER for much improved speed
                              W. Landsman April 2006



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