|
Obsolete IDL Features: Obsolete Routines |
|
This routine is obsolete and should not be used in new IDL code.
The HDF_DFSD_SETINFO procedure controls information associated with an HDF file. Because of the manner in which the underlying HDF library was written, it is necessary to set the dimensions and data type of a scientific data set the first time that HDF_DFSD_SETINFO is called.
This procedure has many options, controlled by keywords. The order in which the keywords are specified is unimportant as the routine insures the order of operation for any given call to it. CLEAR and RESTART requests are performed first, followed by type and dimension setting, followed by length setting, followed by the remaining keyword requests.
If you are not writing any ancillary information, you can call HDF_DFSD_ADDDATA with the SET_TYPE and/or SET_DIMS keywords.
Data string lengths should be set before, or at the same time as, writing the corresponding data string. For example:
HDF_DFSD_SETINFO, LEN_FORMAT=10, FORMAT='12.3F'
or
HDF_DFSD_SETINFO, LEN_FORMAT=10 HDF_DFSD_SETINFO, FORMAT='12.3F'
Due to the underlying C routines, it is necessary to set all four data strings at the same time, or the unspecified strings are treated as `' (null strings).
For example:
HDF_DFSD_SETINFO, LABEL = 'hi' HDF_DFSD_SETINFO, UNIT = 'ergs'
is the same as:
HDF_DFSD_SETINFO, LABEL='hi', UNIT='', FORMAT='', COORDSYS='' HDF_DFSD_SETINFO, LABEL='', UNIT='ergs', FORMAT='', COORDSYS=''
HDF_DFSD_SETINFO [, CALDATA=structure] [, /CLEAR] [, COORDSYS=string] [, DIMS=vector] [, /BYTE | , /DOUBLE | , /FLOAT, | , /INT | , /LONG] [, FORMAT=string] [, LABEL=string] [, LEN_LABEL=value] [, LEN_UNIT=value] [, LEN_FORMAT=value] [, LEN_COORDSYS=value] [, RANGE=[max, min]] [, /RESTART] [, UNIT=string]
None
Set this keyword to make the SDS data type DFNT_UINT8 (1-byte unsigned integer).
Set this keyword to a structure containing calibration information. The structure should contain five tags, the first four of which are double-precision floating-point, and fifth of which should be long integer. For example:
caldata = { Cal: 1.0d $ ; Calibration factor.
Cal_Err: 0.1d $ ; Calibration error.
Offset: 2.5d $ ; Uncalibrated offset.
Offset_Err: 0.1d $ ; Uncalibrated offset error.
Num_Type: 5L $ ; Number type of uncalib.data.
Some typical values for the Num_Type field include:
For byte data:
3L (DFNT_UCHAR8) 21L (DFNT_UINT8)
For integer data:
22L (DNFT_INT16)
For long-integer data:
24L (DFNT_INT32)
For floating-point data:
5L (DFNT_FLOAT32) 6L (DFNT_FLOAT64)
There are other types, but they are not native to IDL. They can be found in the hdf.h header file for the HDF library.
Set this keyword to reset all possible set values to their default value.
A string for the data coordinate system description.
Set this keyword to a vector of dimensions to be used in writing the next SDS. For example:
HDF_DFSD_SETINFO, DIMS = [10, 20, 30]
Set this keyword to make the SDS data type DFNT_FLOAT64 (8-byte floating point).
Set this keyword to make the SDS data type DFNT_FLOAT32 (4-byte floating point).
A string for the data format description.
Set this keyword to make the SDS data type DFNT_INT16 (2-byte signed integer).
A string for the data label description.
The label string length (default is 255).
The unit string length (default is 255).
The format string length (default is 255).
The format coordinate system string length (default is 255).
Set this keyword to make the SDS data type DFNT_INT32 (4-byte signed integer).
The minimum and maximum range, represented as a 2-element vector of the same data type as the data to be written. The first element is the maximum, the second is the minimum. For example:
HDF_DFSD_SETINFO, RANGE = [10,0]
Set this keyword to make the get (HDF_DFSD_GETSLICE) routine read from the first SDS in the file.
A string for the data unit description.
Write a 100x50 array of longs:
data = LONARR(100, 50) HDF_DFSD_SETINFO, /CLEAR, /LONG, DIMS=[100,50], $ RANGE=[MAX(data), MIN(data)], $ LABEL='pressure', UNIT='pascals', $ FORMAT='F10.0'
IDL Online Help (March 06, 2007)