Closed RobinSaam closed 4 years ago
can you run this first
mdf = MDF(filename)
for i, gp in enumerate(mdf.groups):
print(i, mdf.get_master(i))
0 [-1.41525000e-01 -1.31525000e-01 -1.21525000e-01 ... 4.02530848e+03 4.02531848e+03 4.02532848e+03] 1 [0.00000e+00 1.00000e-02 2.00000e-02 ... 4.02545e+03 4.02546e+03 4.02547e+03]
This is the output for the mdf4 file, each containing nearly 400.000 values.
what is you asammdf version?
import asammdf
print(asammdf.__version__)
5.19.1
I'm afraid I'm unable to reproduce the error with my synthetic file.
Can you scramble and send the file for analysis? See https://asammdf.readthedocs.io/en/latest/api.html#asammdf.mdf.MDF.scramble
I send you an e-mail with the link to a repository.
Thank you for the file Robin. I was able to find the error source quickly.
Python version 3.8
Code
MDF version
MDF4 File: 4.10 MDF3 File: 3.30
Description
Hello guys! My problem is that I want to extract the data out of a mdf file. After that I convert them to a pandas dataframe object with .to_dataframe()-function.
My mdf file consist of two groups with a sample rate of 100Hz and 1000Hz. If I chose a *.mdf4 file all of the date after around 100s will be the same as the previous. Example: speed at 80s: 0 km/h, all the values after that point in time will be 0 km/h as well even do the measurement goes on for 30 minutes or so (see Photos/MDF4 File/plot1). The correct output would be Photos/MDF4 File/plot3 or plot5. With Vector Canape I get the same results as plot3 and plot5. If I then extract the samples with data.get(signal) the values will not be 10 km/h and represent the actual value at that time.
Also I get that weird interference at plot 2 and 4.
If I do the same with a *.mdf3 file, I will not get that “error” at all with the same approach.
Photos
MDF4 File
Plot3 and Plot5 should be the output for the rest as well.
plot1 complete view
plot1 zoomed view
plot2 complete view
plot3 complete view
plot4 complete view
plot5 complete view
MDF3 File
plot1 complete view
plot2 complete view
plot3 complete view
plot4 complete view
plot5 complete view