Difference between revisions of "Import resulting data into other applications"

From OpenPSTD
Jump to: navigation, search
(Mathematica)
Line 3: Line 3:
 
= Exported HDF5 file =
 
= Exported HDF5 file =
  
The exported file is an HDF5 file. More information about this format can be found [https://www.hdfgroup.org/HDF5/|here].
+
The exported file is an HDF5 file. More information about this format can be found [https://www.hdfgroup.org/HDF5/ here].
  
 
The structure of the HDF5 format is a tree-like structure with data elements as leaves, which are called data sets. This structure is as follows:
 
The structure of the HDF5 format is a tree-like structure with data elements as leaves, which are called data sets. This structure is as follows:
Line 19: Line 19:
 
==Matlab==
 
==Matlab==
 
Matlab can import the data. This can be done by the following command:
 
Matlab can import the data. This can be done by the following command:
''<code>h5read(filename,datasetname)</code>'' where file name is the hdf5 file name and the datasetname is the data set name, eg ''<code>/frame/4/100</code>'' or ''<code>/receiver/6</code>''. For more info see [http://mathworks.com/help/matlab/hdf5-files.html|Matlab hdf5 reference pages]
+
''<code>h5read(filename,datasetname)</code>'' where file name is the hdf5 file name and the datasetname is the data set name, eg ''<code>/frame/4/100</code>'' or ''<code>/receiver/6</code>''. For example to read frame 42 from domain 4 that is in hdf5 file "result.h5", the following matlab command can be used ''<code>h5read('result.h5','/frame/4/42')</code>''.
 +
 
 +
For more info see [http://mathworks.com/help/matlab/hdf5-files.html Matlab hdf5 reference pages].
  
 
==Mathematica==
 
==Mathematica==
 
More information about import in mathematica can be found at [https://reference.wolfram.com/language/ref/format/HDF5.html Mathematica hdf5 reference pages].
 
More information about import in mathematica can be found at [https://reference.wolfram.com/language/ref/format/HDF5.html Mathematica hdf5 reference pages].

Revision as of 14:57, 28 April 2016

Data exported to the HDF5 format can be imported into other applications.

Contents

Exported HDF5 file

The exported file is an HDF5 file. More information about this format can be found here.

The structure of the HDF5 format is a tree-like structure with data elements as leaves, which are called data sets. This structure is as follows:

  • frame
    • <domain index>
      • <frame index>
  • receiver
    • <receiver index>

For example if you want frame 100 of domain 4, the data element is at /frame/4/100. Or if you want the data of receiver 6, then the resulting data is in element /receiver/6.

Applications

Here is a list of some of the applications that can import this data.

Matlab

Matlab can import the data. This can be done by the following command: h5read(filename,datasetname) where file name is the hdf5 file name and the datasetname is the data set name, eg /frame/4/100 or /receiver/6. For example to read frame 42 from domain 4 that is in hdf5 file "result.h5", the following matlab command can be used h5read('result.h5','/frame/4/42').

For more info see Matlab hdf5 reference pages.

Mathematica

More information about import in mathematica can be found at Mathematica hdf5 reference pages.