0

I'm trying to read .mdf file and write it to .csv file. I found irregular option(timestamps) but it had inconsistent gap.

How can I get a regular interval of time, say of 0.002s ?

My code is below.

from asammdf import MDF, set_global_option
import pandas as pd


set_global_option("raise_on_multiple_occurrences", False)
data = MDF('example.mdf')

df = data.to_dataframe(use_interpolation=True)
df.to_csv('result.csv')

irregular gap of timestamps

endive1783
  • 827
  • 1
  • 8
  • 18
Neoguri
  • 11
  • 1

1 Answers1

0

Have a look at the raster argument https://asammdf.readthedocs.io/en/latest/api.html#asammdf.mdf.MDF.export

danielhrisca
  • 665
  • 1
  • 5
  • 11