ratal / mdfreader

Read Measurement Data Format (MDF) versions 3.x and 4.x file formats in python
Other
169 stars 74 forks source link

A few minor issues #100

Closed ehabibza closed 6 years ago

ehabibza commented 6 years ago

Hi Aymeric, Thank you so much for your great work and support. I've been using your module for a few weeks now which has proved to be quite robust and reliable; well done!

Here I've noticed a couple of minor issues which I'd like to share with you.

  1. Time 1min off:

For ECU datasets of MDF3.x format, the 'minute' value is 1 unit off (ahead); for the commands below,

ecu.append(mdfreader.mdf(file)) print(ecu)

an excerpt of the output would look like this:

file name : Data 2016-10-14 06-59-38-503500 Partition 0.dat author : organisation : project : subject : comment : time : 06:60:38 date : 2016-10-14

I've checked this for different cases and it's always the same (1min off).

  1. masterChannelList:

In the mdfreader.pdf doc, the masterChannelList() is introduced as a method, but when I call ecu.masterChannelList(), I get an error of not callable object! In fact, without brackets (ecu.masterChannelList), it works fine!

  1. resample():

The documentation for this method is somewhat inconsistent; in the Examples section, we have these: yop.resample(0.1) or yop.resample(**channelName**='master3') which fails apparently the method doesn't have an attribute called: channelName. In the Methods section, it's introduced as resample( samplingTime = 0.1, masterChannel=None ) The latter works fine (resample( samplingTime = 0.1, masterChannel='time_0' ) but the former gives an error since it appears that the method doesn't have such an attribute called channelName.

Please feel free to get in touch should you require further details.

Regards, Esmaeil

ratal commented 6 years ago

Hi Esmaeil, Thanks for your encouragement.

  1. This is weid. Time is encoded as text in mdf3, so I think there is little chance to have some reading issue. You can actually confirm content by reading your file with MDFValidator freely downloadable from Vector, or look at file beginning with hexadecimal editor. At first guess I would say time in mdf3 corresponds to file creation and file name time to file writing time.
  2. Thank you, I corrected it.
  3. Indeed, also not correct, thanks for reporting.