HDFPUTSDS Function
Writes a Scientific Data Set to an HDF file.
 
Restriction
See Support for optional PV-WAVE modules to check if this function is available on your operating system.
 
Usage
status = HDFPUTSDS (filename, data)
Input Parameters
filename—A string containing the name of the HDF file.
data—An array containing values for the Scientific Data Set. The keyword data may be of any PV‑WAVE numeric data type or dimension.
Return Value
status—The status of the function call, where:
*SUCCEED (0)—Indicates success.
*FAIL (–1)—Indicates failure.
Keywords
Append—If present and nonzero, append the image to the end of the HDF file. By default, the image is not appended and the contents of the file are overwritten.
Help—If present and nonzero, lists the usage for this routine.
Usage—If present and nonzero, lists the usage for this routine. (Same as the Help keyword.)
Discussion
HDFPUTSDS is used to write an arbitrary array of data to an HDF file as a Scientific Data Set. The numeric data type and dimensions of the Scientific Data Set are based on the numeric data type and dimensions of the array passed. The Append keyword writes additional Scientific Data Sets to the HDF file.
Example 1
hdf_init
@hdf_common
testfile = 'hdfputsds_ex1_output.hdf'
data = BINDGEN (11, 7, 5, 3)
status = HDFPUTSDS(testfile, data)
IF (status EQ FAIL) THEN $
   MESSAGE, 'HDFPUTSDS failed for BYTE data.'
Example 2
hdf_init
@hdf_common
testfile = 'hdfputsds_ex2_output.hdf'
data = INDGEN (6, 8, 7)
status = HDFPUTSDS(testfile, data, /Append)
IF (status EQ FAIL) THEN $
   MESSAGE, 'HDFPUTSDS failed for INTEGER data.'
See Also
Also refer to the following routines in the HDF Reference Manual:
DFSDADDDATA, DFSDPUTDATA, DFSDSETDIMS
For more information on using the HDF interface and the calling sequence for the entire suite of HDF base functions, refer to Appendix A: PV-WAVE HDF Interface.
For a complete list of the HDF convenience routines, refer to Chapter 1: Functional Summary of Routines.