ExternData icon indicating copy to clipboard operation
ExternData copied to clipboard

HDF5

Open thorade opened this issue 8 years ago • 6 comments

The releases page mentions HDF5, but it is not listed in the ReadMe, main features section. https://github.com/tbeu/ExternData/releases https://en.wikipedia.org/wiki/Hierarchical_Data_Format Is this work in progress? Or part of .mat support?

thorade avatar Nov 15 '16 08:11 thorade

It currently is only as part of support for v7.3 MAT-files. No plain HDF5.

tbeu avatar Nov 15 '16 08:11 tbeu

v7.3 MAT-file actually is HDF5 with custom 128 bytes header and some defined attributes. You can use the standard HDF5 tools to work on v7.3 MAT-files.

tbeu avatar Nov 21 '16 13:11 tbeu

I would be interested in the other way around, loading any standard HDF5 file content into Modelica, that is why I asked. Thanks for answering the question, I think this issue can be closed.

thorade avatar Nov 21 '16 13:11 thorade

Question is, what you mean by "standard HDF5 file content". HDF5 is like XML, that is you define the data and datagroup layout. If you use netCDF or v7.3 MAT (or also MTSF) files, they have done it for you.

tbeu avatar Mar 31 '17 10:03 tbeu

Question is, what you mean by "standard HDF5 file content". HDF5 is like XML, that is you define the data and datagroup layout. If you use netCDF or v7.3 MAT (or also MTSF) files, they have done it for you.

I (not the OP) would mean to be able to point to a Dataset (inside a Group or not) in an HDF5 file with the appropriate dimensions and datatype and use that just like a Dataset from a .mat file. E.g. in the lingo of Examples.Mattest, say timeTable(table=dataSource.getRealArray2D("group1/subgroup1/mytable", 3, 2))

That would make it easy to use this package (that effectively understands HDF5 already) to work with ~generic HDF5 (or even netCDF4?) files (e.g. from data acquisition hardware), if you don't have Matlab available.

bilderbuchi avatar Apr 14 '23 10:04 bilderbuchi

OK, that seems like a nice addition.

beutlich avatar Apr 15 '23 19:04 beutlich