This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

HDF (.hdf)

MIME type: application/x-hdf
HDF data format Version 4.
General-purpose format for representing multidimensional datasets.
Used for storage, management, and exchange of scientific data.
HDF is an acronym for Hierarchical Data Format.
Developed by the U.S. National Center for Supercomputing Applications (NCSA).
Binary file format.
Incompatible with HDF Version 5.
  • Import and Export support the scientific dataset (SD) data model of the HDF format.
  • Import imports an HDF file, returning the names of the datasets stored in the file.
  • Export exports a multidimensional array to an HDF file.
  • Import returns a list of strings representing the names of all datasets contained in the file.
  • Export creates an HDF file, storing the arrays as separate datasets.
  • Import imports the specified element from an HDF file.
  • Import imports multiple elements.
  • Export creates an HDF file by treating expr as specifying element elem.
  • Export treats each as specifying the corresponding .
  • Export exports expr with the specified option elements taken to have the specified values.
  • Export uses rules to specify the elements to be exported.
  • See the reference pages for full general information on Import and Export.
"Elements"list of elements and options available in this file
"Rules"full list of rules for each element and option
"Options"list of rules for options, properties, and settings
  • Data representation elements:
"Data"all datasets imported as a list of arrays
"Datasets"names of all datasets
  • Import by default uses the element for the HDF format.
  • Specifying and selecting datasets:
"Datasets",nn^(th) dataset
"Datasets",datasetnamed dataset
  • Meta-information elements:
"DataFormat"type used to represent each dataset
"Dimensions"data dimensions of each dataset
  • The following values can be given for :
"Integer8"8-bit integers
"Integer16"16-bit integers
"Integer32"32-bit integers
"UnsignedInteger8"8-bit unsigned integers
"UnsignedInteger16"16-bit unsigned integers
"UnsignedInteger32"32-bit unsigned integers
"Real32"IEEE single-precision numbers
"Real64"IEEE double-precision numbers
"Append"Falsewhether to append to an existing file
Show the names of datasets in a file:
Import a dataset and render it as a raster image:
Render as ArrayPlot, specifying a color scheme:
Rasterize the color image and export the data to HDF:
Create a random matrix and export it to HDF:
Show the datasets contained in the generated file:
Import the data:
Show the names of datasets in a file:
In[1]:=
Click for copyable input
Out[1]=
Import a dataset and render it as a raster image:
In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
Out[3]=
Render as ArrayPlot, specifying a color scheme:
In[4]:=
Click for copyable input
Out[4]=
Rasterize the color image and export the data to HDF:
In[5]:=
Click for copyable input
Out[5]=
 
Create a random matrix and export it to HDF:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
Show the datasets contained in the generated file:
In[3]:=
Click for copyable input
Out[3]=
Import the data:
In[4]:=
Click for copyable input
Out[4]=