Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different sample values when using asammdf 6.x vs 7.x #758

Closed
alex-ruehe opened this issue Aug 26, 2022 · 4 comments
Closed

Different sample values when using asammdf 6.x vs 7.x #758

alex-ruehe opened this issue Aug 26, 2022 · 4 comments

Comments

@alex-ruehe
Copy link
Contributor

Python version

python=3.10.6 (main, Aug 11 2022, 13:49:25) [Clang 13.1.6 (clang-1316.0.21.2.5)]

os=macOS-12.5.1-x86_64-i386-64bit

numpy=1.23.2
asammdf=7.1.1 / asammdf=6.2.0

Code

MDF version

3.10

Code snippet

from asammdf import MDF
fn = "signals.mdf"
mdf = MDF(fn)
print(mdf.get(X).samples)

Traceback

None

Description

We recently switched from asammdf 6.2.0 to 7.1.1 and some of our analysts reported problems when running their code:

  1. Read MDF file (version 3.10, generated using G.i.N. toolchain) with asammdf 6.2.0 in Python 3.10

  2. print samples of channel X

  3. samples are correct (([-40. -40. 29.75 ... 31.25 31.25 31.25]))

  4. Read same MDF file with asammdf 7.1.1 in Python 3.10

  5. print samples of channel X again

  6. samples are not correct ([-40. -40. -39.25 ... -39.25 -39.25 -39.25])

This behaviour does not apply to all channels, so far we could not detect a system behind which channels are affected, but we're looking into that.

We started debugging the asammdf source code and ended up in the mdf_v3.py:get function when the channel values are extracted. This part looks like it changed significantly between 6.x.x and 7.x.x.

We tried to just export one single channel into a new MDF file using the GUI (v6.2.0), but if we do this, the samples in this file are correct extracted in both versions. If we use a 7.x.x version of the GUI the extracted samples are incorrect.

@danielhrisca
Copy link
Owner

It would be easiest if you send a file for analysis (email in the profile page)

@alex-ruehe
Copy link
Contributor Author

I will see what I can do on Monday, thanks!

danielhrisca added a commit that referenced this issue Aug 29, 2022
@danielhrisca
Copy link
Owner

@r-xela thank you for the demo file. Please try the development branch code

@alex-ruehe
Copy link
Contributor Author

@danielhrisca We tested some channels where we found the issue and it looks like it works now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants