Skip to content

Problems with reading mff files #11188

@elba1212

Description

@elba1212

Description of the problem

Hi,
I am trying to open data files that recorded with EGI system, with mne.io.read_raw_egi.
for some recordings it works perfectly fine and for others I get an error message.

MNE version: 1.1.1
tried also 1.2.dev0 version and the error persisted.
operating system: Windows 10

here is an example code and files. for sub3003 I can read the file and for sub3004 I get an error message.

Steps to reproduce

import mne

sub3003 = r"C:\Users\paltiele.WISMAIN\Dropbox (Weizmann Institute)\PhD\Learning_faces\EEG experiment\data\samples\EL3003_SLEEP_20220221_015208.mff"
raw3003 = mne.io.read_raw_egi(sub3003)

sub3004 = r"C:\Users\paltiele.WISMAIN\Dropbox (Weizmann Institute)\PhD\Learning_faces\EEG experiment\data\samples\EL3004_SLEEP_20220309_125216.mff"
raw3004 = mne.io.read_raw_egi(sub3004)

Link to data

subject 3003:
https://www.dropbox.com/s/ptgf959fdhs2ydn/EL3003_SLEEP_20220221_015208.mff.zip?dl=0

subject 3004:
https://www.dropbox.com/s/8ydahvu84dhv6f6/EL3004_SLEEP_20220309_125216.mff.zip?dl=0

Expected results

read the mff file smoothly

Actual results

Error message:

'''
sub3004 = r"C:\Users\paltiele.WISMAIN\Dropbox (Weizmann Institute)\PhD\Learning_faces\EEG experiment\data\EEG\EL3004\EL3004_SLEEP_20220309_125216.mff"
raw = mne.io.read_raw_egi(sub3004)
Reading EGI MFF Header from C:\Users\paltiele.WISMAIN\Dropbox (Weizmann Institute)\PhD\Learning_faces\EEG experiment\data\EEG\EL3004\EL3004_SLEEP_20220309_125216.mff...
Traceback (most recent call last):

File "C:\Users\paltiele.WISMAIN\AppData\Local\Temp\ipykernel_12524\2134038754.py", line 2, in
raw = mne.io.read_raw_egi(sub3004)

File "", line 12, in read_raw_egi

File "C:\Users\paltiele.WISMAIN\Anaconda3\envs\for_visbrain\lib\site-packages\mne\io\egi\egi.py", line 157, in read_raw_egi
exclude, preload, channel_naming, verbose)

File "", line 12, in _read_raw_egi_mff

File "C:\Users\paltiele.WISMAIN\Anaconda3\envs\for_visbrain\lib\site-packages\mne\io\egi\egimff.py", line 390, in _read_raw_egi_mff
preload, channel_naming, verbose)

File "", line 12, in init

File "C:\Users\paltiele.WISMAIN\Anaconda3\envs\for_visbrain\lib\site-packages\mne\io\egi\egimff.py", line 404, in init
egi_info = _read_header(input_fname)

File "C:\Users\paltiele.WISMAIN\Anaconda3\envs\for_visbrain\lib\site-packages\mne\io\egi\egimff.py", line 212, in _read_header
mff_hdr = _read_mff_header(input_fname)

File "C:\Users\paltiele.WISMAIN\Anaconda3\envs\for_visbrain\lib\site-packages\mne\io\egi\egimff.py", line 93, in _read_mff_header
list(epochs['last_samps'])))

RuntimeError: EGI epoch first/last samps could not be parsed:
[0]
[26586364]
'''

Additional information

Platform: Windows-10-10.0.19041-SP0
Python: 3.7.13 (default, Mar 28 2022, 08:03:21) [MSC v.1916 64 bit (AMD64)]
Executable: C:\Users\paltiele.WISMAIN\Anaconda3\envs\for_visbrain\python.exe
CPU: Intel64 Family 6 Model 140 Stepping 1, GenuineIntel: 8 cores
Memory: 31.7 GB

mne: 1.2.dev0
numpy: 1.21.6 {MKL 2022.1-Product with 4 threads}
scipy: 1.7.3
matplotlib: 3.5.3 {backend=module://matplotlib_inline.backend_inline}

sklearn: 1.0.2
numba: 0.56.2
nibabel: Not found
nilearn: Not found
dipy: Not found
openmeeg: Not found
cupy: Not found
pandas: 1.3.5
pyvista: Not found
pyvistaqt: Not found
ipyvtklink: Not found
vtk: Not found
qtpy: Not found
ipympl: Not found
pyqtgraph: Not found
pooch: v1.6.0

mne_bids: Not found
mne_nirs: Not found
mne_features: Not found
mne_qt_browser: Not found
mne_connectivity: Not found
mne_icalabel: Not found

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions