Closed willGraham01 closed 1 year ago
Patch coverage: 63
% and project coverage change: -1
:warning:
Comparison is base (
e8e9809
) 27% compared to head (221a033
) 26%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Nice!
Allows us to read complex MATLAB arrays via the HDF5 API.
To do this, we have to define (at runtime) a
H5::CompType
instance that describes the data-structure that needs to be read in - in this case, that describes the format in which MATLAB saves complex data. Note that there is no HDF5 standard for complex datatypes, so trying to read complex data from something likeh5py
- created files will require separate, but similar, treatment.Implementation
The
hdf5_compound_types.{h,cpp}
file has been created to contain compound types.Currently there is only one compound type,
MATLAB_complex
. But the following convention has been set given the remark above about compound datatypes and the lack of standard format for complex-values in particular:struct
that is compatible with the compound data-type to be readto_hdf5_CompType()
method that returns aH5::CompType
instance, that can be passed to the API to read data into the aforementionedstruct
via theread
method.std::
datatypes (orstd::vector
s thereof) so that we don't have to reimplement algebra.Testing
Additional tests in
test_hdf5_compound_types.cpp
that check that:HDF5Reader::read()
method performs as expected forMATLAB_complex
types