-
-
Notifications
You must be signed in to change notification settings - Fork 226
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
Asammdf cut function modifying signal values #1084
Comments
please send a demo file, the cut arguments and the signal name |
Hi, thanks for the quick response. Regarding the demo file and the signal names, I would have to check with my team if it can be shared, meanwhile I have attached a snippet of the cut function which we are using. Codefor idx, signal_time_slice in enumerate(split_timestamp): Here split_timestamp contains a nested list, inside which, each list contains a subset of the timestamp values which we use in signal_start and signal_end to cut the mf4 file and then save it using the save function. For example, given a set of timestamp such as 0.0588730000000000 till 16906.0588730000017677, the first mdf object will be created by using cut function from 0.0588730000000000 to 8447.6588720000007015 and second mdf object will be created by using cut function from 8447.7500000000000000 to 16905.9588729999995849, and then both the files are saved. The split_timestamp list is separately calculated. I have also shared the screenshots of the signal values(signal names have been masked) as seen in the original file, the first split file (where the signal values are modified), the second split file(where the signal values are not modified) via mail to you. Thanks again, and please let me know if you need any more information. |
Hi Daniel, just wanted to check if you got a chance to review the code, screenshots and the demo mf4 file I shared ? Do let me know if you need any additional information. Thanks. |
Python version
'python=3.10.12 (main, Jul 29 2024, 16:56:48) [GCC 11.4.0]'
'os=Linux-5.15.0-1071-azure-x86_64-with-glibc2.35'
'numpy=1.23.5'
'asammdf=8.0.0'
MDF version
4.10
Code snippet
Cannot share the code unfortunately.
Traceback
No code error observed.
Description
We are using the asammdf cut function to cut the mf4 file based on the timestamps, once the file is cut we use the asammdf save function to save the cut files. When we read both the cut files, we observed that few of the signal values in one of the cut file were modified.
For example, given a mf4 file (containing a mixture of 10 hz and 1 hz signal data) containing multiple signals and timestamps from 0.0588730000000000 till 16906.0588730000017677.
Using asammdf cut function, the file was cut from timestamp - 0.0588730000000000 to 8447.8588720000007015 to create the first file and timestamp - 8447.7500000000000000 to 16905.9588729999995849 to create the second file. We observed in the first cut file, for around 4-5 signals, the values were changed/modified. Ex, the float signal values which were previously 7.0 is changed to 0.0, the string values are changed to null.
We checked this for different version of asammdf, the result is the same. For different mf4 file, the signals which get modified are different, but always the file which is cut where the start = None and end = random timestamp(which is not None) is the file where the signals are modified.
This does not happen if the file is cut and both the start and stop timestamp is None, here the signal values are not modified, but the channel object containing the lower_limit and upper_limit values are reset to 0.
Please let me know if you need any more information.
The text was updated successfully, but these errors were encountered: