The HDF_DFSD_SETINFO procedure controls information associated with a Hierarchical Data Format 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'
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'
HDF_DFSD_SETINFO, LABEL='hi', UNIT='', FORMAT='', COORDSYS=''
HDF_DFSD_SETINFO, LABEL='', UNIT='ergs', FORMAT='', COORDSYS=''
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 uncalibrated
Some typical values for the
Num_Type
field include:
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.
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: