OriginLab Corporation - Scientific Graphing and Data Analysis Software - 2D graphs, 3D graphs, Contour Plots, Statistical Charts, Data Exploration, Statistics, Curve Fitting, Signal Processing, and Peak Analysis

impHDF5

Contents

Menu Information

HDF5 (H5, HE5, HDF5)

Brief Information

Import HDF5 file. File versions below 1.8.2 supported.

Additional Information

Minimum Origin Version Required: 8.1 SR0, updated in 8.6 SR0

Command Line Usage

  1. impHDF5 fname:=C:\hdf5_test.h5;
  2. impHDF5 fname:=C:\hdf5_test.h5 options.bStructureOnly:=1;

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
File Name fname

Input

string

fname$
Filename(s) of the file(s) to be imported. Click the browse button near the list box to open one or more files. Filenames will be listed in the box.
Import as Folder Structure impMode

Input

int

1
As of Origin 8.6, this variable is no longer used.
File Info and Data Selection trfiles

Input

TreeNode

<unassigned>
This is used to select the desired data channels. See more details in Description section.
Import Options options

Input

TreeNode

<unassigned>
When importing an HDF5 file, you can import just the file structure, or you can save the file information in a workbook to allow for re-importing. If both of the following check-boxes are selected, the reimport X-Function can be used to re-import part of the desired data after importing the file structure.

Options:

  • bStructureOnly:Import Structure Only
    If checked, only the structure of the file will be imported.
  • bSaveFileInfo:Save File Info. in Workbook
    If selected, the file information will be saved to the workbook. If not selected, the file information will not be saved and the re-import will not work.
Output orng

Output

Range

<active>
Specify the range for the imported data.

See the syntax of Output Notations.

Header Info trheader

Output

TreeNode

<unassigned>
For outputting header information. This is hidden from the GUI. Use of this variable is not advised.
Repeat Import reimp

Input

int

0
This is used for repeat import. Use of this variable is not advised.

Description

The Hierarchical Data Format (HDF) is a set of file formats and libraries designed for storing and organizing large amounts of numerical data. HDF4 is the older version of this format, and HDF5 is designed to address some of the limitations of the HDF4 library. HDF5 simplifies the file structures of datasets and groups. Datasets are multidimensinal arrays of a homogenous type and groups are container structures which can hold datasets and other groups.

This X-Function is used for importing HDF5 data files whose version is lower than 1.8.2. This X-Function supports multi-file import. When an HDF5 file is imported, the workbook is used to store data such as notes, one-dimensional datasets, arrays of structures, and vector data with mixed types.

Two- or more-dimensional datasets and image data are stored in a matrix book. In a matrix book, the channel number of each matrix sheet is decided by the dataset. This allows the import of the HDF5 file's structure, as well as the separate re-import of desired data using the reimport X-Function.

Details on Some Dialog Options

This variable is a treenode. It shows file information and allows you to choose the channels to import. The name of each sub-treenode is the name of the corresponding file. Under each sub-treenode, the file size and any available data are listed.

Examples

The following example shows how to import the structure of an HDF5 data file (c:\hdf5_test.h5), and then use the reimport sel:=1; to import the desired data into a workbook.

  1. Create a new project. Select File: Import: HDF5 (H5, HE5, HDF5)... from the Origin menu. This opens the HDF5 file browser.
  2. Select C:\hdf5_test.h5' and then click the Add File(s) button. Make sure that the Show Options Dialog check-box is selected.
  3. Click the OK button to close the file browser. The Import and Export: impHDF5 dialog should now open.
  4. In the File Info And Data Selection: hdf5_test: Data Selection branch, select all the check boxes.
  5. In the Import Options branch, check the Import Structure Only check box and keep the Save File Info. in Workbook check box selected.
  6. Change Output to <new>.
    Image:ImpHDF5_1.png
  7. Click the OK button to import only the structure of this HDF5 file.
  8. To import a selected data range, activate the corresponding empty worksheet, and then run:
    reimport sel:=1;

Related X-Functions

cd, impinfo, findFiles, impFile