HDF_DFSD_GETINFO

The HDF_DFSD_GETINFO procedure retrieves information about the current Hierarchical Data Format file.

Note that calling HDF_DFSD_GETINFO with the DIMS or TYPE keywords may alter which dataset is current. See "Reading an Entire Scientific Dataset" and "Getting Other Information About SDSs" in the NCSA HDF Calling Interfaces and Utilities documentation.

Note that reading a label, unit, format, or coordinate system string that has more than 256 characters can have unpredictable results.

Calling Sequence

HDF_DFSD_GETINFO, Filename

Arguments

Filename

A scalar string containing the name of the file to be read. A filename is only needed to determine SDS dimensions and/or the number of SDSs in a file.

Keywords

CALDATA

Set this keyword to a named variable which will contain the calibration data associated with an SDS data set. The data will be returned in a structure of the form:

{ CAL: 0d, CAL_ERR: 0d, OFFSET: 0d, $

  OFFSET_ERR: 0d,NUM_TYPE: 0L }

COORDSYS

Set this keyword to return the data coordinate system description string.

DIMS

Set this keyword to a named variable in which the dimensions of the current SDS are returned in a longword array.

FORMAT

Set this keyword to return the data format description string.

LABEL

Set this keyword to return the data label description string.

LASTREF

Set this keyword to return the last reference number written or read for an SDS.

NSDS

Set this keyword to return the number of SDSs in the file.

RANGE

Set this keyword to return the valid max/min values for the current SDS.

TYPE

Set this keyword to a named variable which returns a string describing the type of the current SDS (e.g., 'BYTE' , 'FLOAT' , etc.).

UNIT

Set this keyword to return the data unit description string.

Example

The following commands read an SDS, including information about its dimensions but not its annotations:

HDF_DFSD_GETINFO, filename, DIMS=d, TYPE=t, RANGE=r, $

              LABEL=l, UNIT=u, FORMAT=f, COORDSYS=c

...

FOR i = 0, N_ELEMENTS(d)-1 DO BEGIN

HDF_DFSD_DIMGET, i, LABEL=dl, UNIT=du, FORMAT=df, SCALE=ds

...

ENDFOR

HDF_DFSD_GETDATA, filename, data