Institut für Astronomie und AstrophysikAbteilung AstronomieSand 1, D-72076 Tübingen, Germany |
HOST_TO_IEEE
Translate an IDL variable from host to IEEE representation
The variable is converted from the format used by the host architecture into IEEE-754 representation (as used, for example, in FITS data ). Duplicates most of the functionality of the SWAP_ENDIAN_INPLACE procedure introduced in V5.6, with the addition of the IDLTYPE keyword.
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
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).
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
The BYTEORDER procedure is called with the appropriate keywords
Adapted from CONV_UNIX_VAX, W. Landsman Hughes/STX January, 1992 Version for IDL V5.0 August 1997 Converted to IDL V5.0 W. Landsman September 1997 Added new integer datatypes C. Markwardt/W. Landsman July 2000 Use /SWAP_IF_LITTLE_ENDIAN keyword for 64bit types W. Landsman Feb 2003
[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]