Skip to content

Change one signals value in existing file then store to a new file #827

Answered by danielhrisca
danielzmod asked this question in Q&A
Discussion options

You must be logged in to vote
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')

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@danielzmod
Comment options

Answer selected by danielzmod
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants