Next: IRAF Versions
Up: Specifications of CONVERT IDL Procedures
Previous: HDS2IDL - Convert a Starlink HDS file to an IDL variable.
IDL2HDS
- Convert an IDL variable to a Starlink HDS file.
- Description:
- This IDL procedure will create a Starlink HDS file corresponding to the
IDL variable, which may be a scalar, array or structure.
- Usage:
- IDL> idl2hds, IDL_struct, filename
- Arguments:
-
-
IDL_struct
-
The IDL variable to be written.
-
filename
-
A string expression specifying name of the HDS file to be written.
The HDS structure is not necessarily identical to the IDL
structure (see "Notes").
- Notes:
- Type correspondence is as follows:
- floating -
_REAL
- double-precision -
_DOUBLE
- byte -
_UBYTE (unless _LOGICAL, see below).
- integer -
_WORD (unless _LOGICAL, see below).
- longword integer -
_INTEGER (unless _LOGICAL, see below).
- string -
_CHAR*(IDL string size)
- Each HDS structure will have a type as defined by the
HDSSTRUCTYPE component of the IDL structure. If there is no such
component, the HDS type is blank.
- Byte, integer or longword integer components which have
LOGICAL_ prefixed to their name will be converted to _LOGICAL
HDS components and the prefix will be removed from the name.
- IDL strings will be converted into HDS _CHAR components
whose size is the size of the IDL string. If a size greater than the
used length is required, the IDL string must be padded with blanks.
- HDS arrays of structures will be created from IDL structures
having
the form produced from HDS arrays of structures by HDS2IDL.
-
Examples:
-
- IDL> idl2hds, data_struct, 'my_file'
- Assuming data_struct is an IDL structure, this creates
the HDS file 'my_file.sdf' with a corresponding
structure.
-
Deficiencies
:
- It is not possible to obtain an identical structure in all
cases (see "Notes").
- It is not possible to produce HDS components of type
_UWORD or _BYTE.
- Complex values are not handled.
- IDL arrays of more than 1 structure are not handled.
- Only a complete HDS file can be written.
-
Related Applications
:
- CONVERT: HDS2IDL.
Next: IRAF Versions
Up: Specifications of CONVERT IDL Procedures
Previous: HDS2IDL - Convert a Starlink HDS file to an IDL variable.
CONVERT A Format-conversion Package
Starlink User Note 55
Malcolm J. Currie
G.J.Privett
A.J.Chipperfield
D.S.Berry
A.C.Davenhall
2010 February 2
E-mail:ussc@star.rl.ac.uk
Copyright © 2005 Council for the Central Laboratory of the Research Councils