.mat files save values as doubles by default, and thus the .mat inputs that we provide to TDMS have values stored as double when we are expecting to read them into std::vector<int> for example.
This causes segmentation faults when we attempt to read in data that we expect to be integer-valued, using the HDF5C++ API.
There are several variables that we attempt to read in as ints. Creating a list of known places here which will be added to as more are found.
Known variables that are affected:
campssample -> components (saved as double but contains int values). Appears in VertexPhasors.
fieldsample -> i,j,k (saved as double but contains int values). Appears in FieldSample.
We can circumnavigate this by introducing intermediary buffers in our read methods, but this is not ideal.
For the purposes of removing the MATLAB header dependency (#70) this is an acceptable workaround.
However in the future we should look to be stricter in how the input files (via iteratefdtd_matrix and others) are written.
.mat
files save values as doubles by default, and thus the.mat
inputs that we provide to TDMS have values stored asdouble
when we are expecting to read them intostd::vector<int>
for example.This causes segmentation faults when we attempt to read in data that we expect to be integer-valued, using the
HDF5
C++
API.There are several variables that we attempt to read in as ints. Creating a list of known places here which will be added to as more are found. Known variables that are affected:
campssample
->components
(saved as double but containsint
values). Appears inVertexPhasors
.fieldsample
->i,j,k
(saved as double but containsint
values). Appears inFieldSample
.We can circumnavigate this by introducing intermediary buffers in our read methods, but this is not ideal.
iteratefdtd_matrix
and others) are written.