# Import resulting data into other applications

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

# Exported HDF5 file

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

• `PSTD` since version 2.1, was `frame` in version 2.0
• <domain index>
• <frame index>
• `DG` since version 2.1
• <frame index>
• `receiver` since version 2.0
• `Settings` since version 2.1
• <setting name>

Version 2.0 used `/frame` in place of `/PSTD`. This change was made to make a difference between the PSTD data and the DG data

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

# Settings

In this group are data sets of size 1 that specify a certain calculation setting. These are the settings with which the calculations are done. Settings with the following names are exported:

• RenderTime
• SoundSpeed
• AttenuationOfPMLCells
• MaxFrequency
• DensityOfAir
• PatchError
• FactRK
• GridSpacing
• BandWidth
• WaveLength
• SpectralInterpolation
• PMLCells

# 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 `/PSTD/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','/PSTD/4/42')`.

For more info see Matlab hdf5 reference pages. There are also functions that can query the file. The file can be queried for which domains are in it, which frames of each domain and which receivers are in it.

## Mathematica

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

## Python

Python has also an interface to HDF5. This interface can be found at h5py.org

## R

R has also an interface to the HDF5 format. This interface can be found at the CRAN repo.
{"ft_lang_label":"__label__en","ft_lang_prob":0.8632428,"math_prob":0.4712327,"size":2302,"snap":"2019-35-2019-39","text_gpt3_token_len":594,"char_repetition_ratio":0.11618799,"word_repetition_ratio":0.0154639175,"special_character_ratio":0.23718506,"punctuation_ratio":0.1,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9597839,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-09-22T04:50:40Z\",\"WARC-Record-ID\":\"<urn:uuid:9b5b44c6-54a6-4f8a-9c85-0fa7b8549a70>\",\"Content-Length\":\"18782\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:78da5af1-755a-4d17-9519-934b4d5363ff>\",\"WARC-Concurrent-To\":\"<urn:uuid:1226d614-7dbb-4f96-965e-67546230a2ca>\",\"WARC-IP-Address\":\"37.34.48.53\",\"WARC-Target-URI\":\"http://www.openpstd.org/wiki/index.php?title=Import_resulting_data_into_other_applications&redirect=no\",\"WARC-Payload-Digest\":\"sha1:EFLXMMWYSAFHXWSMFUW2RECMPDZTUR3J\",\"WARC-Block-Digest\":\"sha1:MVCSHIVO7LNSNLSZZCOVG7G4OAWAU2SJ\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-39/CC-MAIN-2019-39_segments_1568514575076.30_warc_CC-MAIN-20190922032904-20190922054904-00169.warc.gz\"}"}