-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Hi!
I am currently building a BIDS Docker App that takes three iEEG data formats: MEF3, EDF and BrainVision. In order to read the EDF and Brainvision formats I am using MNE-tools (mne-python, latest stable version 0.19.2) in Python 3.8.
To test the reading of data in Python I converted one dataset into all three formats. While being successful at loading each of the data formats into python, the raw data values coming from MNE seem to differ (see the attached image below):
- The raw values that MNE returns from the Brainvision format seem to be the correct values but scaled down
- The raw values that MNE returns from the EDF format are partial correct, but are wrong on values below 0.
The mne.io.read_raw_edf and mne.io.read_raw_brainvision functions were used to read the data and I retrieved the raw values using the methods described here:
https://mne.tools/dev/auto_tutorials/raw/plot_10_raw_overview.html#extracting-data-from-raw-objects
In order to see if the cause was not in the data files, I tried two other methods to read the data:
- I read the exact same data files in Matlab using the Fieldtrip package and there the BrainVision and EDF did show the correct values.
- I used another Python EDF reader (PyEdfLib), which also gave the correct values.
These led me to believe it is something MNE reader, rather than something in the data.
I am not sure whether there is a conversion or data casting step in the reading of the raw data that I am missing? Or whether this could be a bug in the MNE reading function?
@jasmainak @dorahermes
Hope you can help. If more information is needed, then please let me know...
Thanks in advance,
Max
