READ_NDF
- Convert a Starlink NDF to an IDL array.
Description:
This IDL function will convert a Starlink NDF file of up to seven
dimensions to an IDL array of an appropriate type and shape.
Bad values
in the NDF may be converted to specific values in the IDL array.
If NDF on-the-fly conversion has been activated, the given filename may
refer to a file of a different data format which is to be converted.
Result = READ_NDF( Ndf_name[, Bad_value][,COMPONENT=Comp_name])
Arguments:
Ndf_name
A string expression specifying name of the NDF to be read.
Bad_value
Optional - A value to replace in the IDL array any occurrence of
the PRIMDAT bad value in the NDF component. The value must be the
same type as the array.
Keywords:
COMPONENT
Set this to a string expression specifying the NDF component to be
read. It may be "DATA", "VARIANCE" or
"QUALITY" and defaults to "DATA".
The case of the string does not matter and it may be
abbreviated to one or more characters.
Returned Value:
Result
An IDL array of a size and type corresponding with the NDF. The type
correspondence is as follows:
As above except that any occurrence of a bad value (VAL__BADR as
defined by the Starlink PRIMDAT package) in the NDF will be replaced
by NaN in the IDL array.
IDL> quality = read_ndf('my_ndf',comp='q')
creates an IDL byte array from the QUALITY component of the same NDF.
(The QUALITY component is always type _UBYTE.)
Note that the keyword 'component' and the value 'QUALITY' are
case-independent and can be abbreviated.
Deficiencies
:
No conversion of the given bad value to the appropriate type for
the array will be attempted; instead an error will be reported.
CONVERT A Format-conversion Package Starlink User Note 55 Malcolm J. Currie G.J.Privett A.J.Chipperfield D.S.Berry A.C.Davenhall 2008 May 19 E-mail:ussc@star.rl.ac.uk