Closed victorjoh closed 8 months ago
asammdf is using bit_count / 8
to calculate the end offset when looking at the data_bytes
(see traceback)
instead I think asammdf should look at byte_offset_base
(no division by 8) to get the offset
It makes sense when looking at the descriptions in MDF Validator, but it could also be that Silver has misinterpreted the MDF standard. I don't have a copy of the standard myself so I cannot validate what interpretation is correct.
It should be a simple fix in asammdf. I can make a PR for it.
Python version
'python=3.9.18 (main, Sep 11 2023, 13:41:44) \n[GCC 11.2.0]' 'os=Linux-6.5.5-200.fc38.x86_64-x86_64-with-glibc2.37' 'numpy=1.26.0' 'asammdf=7.3.14'
Code
MDF version
4.10
Code snippet
Traceback
Description
No mdf file is needed to reproduce this issue. The mdf is constructed in the code above to reproduce the problem. We create an mdf from scratch where we have a signal that is a channel array of boolean values. Since it is booleans we set the bit count to 1. When trying to read the signal from the mdf, we get an error.
I found this issue when dealing with an mdf generated from the tool Silver (T-2022.03-2) from QTronic. The mdf created above reproduces that problem I originally found when importing the mdf from Silver with asammdf.