UCL / TDMS

Time Domain Maxwell Solver
https://github-pages.ucl.ac.uk/TDMS
GNU General Public License v3.0
12 stars 4 forks source link

Reading complex-valued arrays from HDF5 files. #335

Closed willGraham01 closed 1 year ago

willGraham01 commented 1 year ago

Pertains to #70 and #285.

There is no support within HDF5 for a complex number datatype. The norm for both MATLAB and h5py seems to be to create a custom H5COMPOUND datatype that encodes the real and imaginary parts separately, and to save the data in this format.

This means we need to adapt to this when reading our input file, for example when reading in the DTilde array. By the looks of things, when handling a .mat input we will need to define a compound datatype that can handle the format below: image

IE a compound datatype that has a real and imag member.

samcunliffe commented 1 year ago

Solved with #343.