Change one signals value in existing file then store to a new file #827
Answered
by
danielhrisca
danielzmod
asked this question in
Q&A
Replies: 1 comment 1 reply
-
from asammdf import MDF, Signal
file = "test.mdf"
mdf = MDF(file)
mdf2 = MDF(version=mdf.version)
for sig in mdf.iter_channels(raw=True):
if "Speed" in sig.name:
sig.samples = sig.samples*10
mdf2.append(sig, )
mdf2.save('new.mdf') |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
danielzmod
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
Im trying to change the value of a signal (for example multiply a signal by 10). Then store it as a new file but with all metadata and conversion preserved.
I started with approach below and manage to get the signal correct. But then i lost all metadata and conversion of signals. It looks like the signal objects doesn't contain all metadata.
I searched around and found this solution for renaming signals.
But i cant access and change the raw samples for each channel thru here.
Do anyone else have a nice solution for this?
Best regards
Daniel
Beta Was this translation helpful? Give feedback.
All reactions