pythonmdfasammdf

Where to find info about MDF file structures and about "Group" and "Index" when working with .mdf files?


Background info:

I'm trying to use asammdf to import .dat files in python.

Trying to use "mdf.select(["Channel_name"])" - or variations thereof - gives the following error:

asammdf - ERROR - Multiple occurances for channel "Channel_name": ((2, 18), (2, 18)). Provide both "group" and "index" arguments to select another data group in Python.

I've sort of managed to get it to work by bastardising some other code written by someone else which uses "mdf.channels_db" to eventually extract the channel data.

My issue is that I don't fully understand what I am doing, and therefore not sure I am using this in the most efficient way.

I've been through the asammdf documentation but did not really find an explanation.

What does the error even mean and why am I getting?

My hunch is that it has something to do with the structure of MDF files. Is that correct?

Potentially the Channel Name in question appears more than once in the MDF, but then the location given in the error is the same twice: (2, 18), and this matches with what is see returned by mdf.info()

Any idea where I can find out more?


Solution

  • Data ia stores in channel groups in the MDF standard. See the intro here https://www.asam.net/standards/detail/mdf/wiki/

    To visualize the file internal structure you can use Vector MDFValidator or the asammdf library GUI