Skip to content

cannnot read nihon kohden .EEG file by mne python #9462

@jordandc1

Description

@jordandc1

Describe the bug

I recently got a .eeg file from a hospital, but I cannot read it by MNE-python. I noticed that the version (EEG-1200A V01.00) is not supported at this moment.
Can anyone help with this problem?

Steps to reproduce

import matplotlib
import pathlib
import mne

sample_data_dir = mne.datasets.sample.data_path()
raw_path = sample_data_dir / 'MEG' / 'sample' / 'FA0015AA.EEG'
raw = mne.io.read_raw_nihon(raw_path)
print(raw.info)
raw.plot()

Expected results

The .EEG data should be loaded.

Actual results

Loading FA0015AA.EEG
Reading header from C:\Users\Surface\mne_data\MNE-sample-data\MEG\sample\FA0015AA.EEG
Traceback (most recent call last):
  File "C:\Users\Surface\PycharmProjects\mne_plot\plot_test.py", line 13, in <module>
    raw = mne.io.read_raw_nihon(raw_path)
  File "C:\Users\Surface\PycharmProjects\mne_plot\venv\lib\site-packages\mne\io\nihon\nihon.py", line 46, in read_raw_nihon
    return RawNihon(fname, preload, verbose)
  File "<decorator-gen-243>", line 24, in __init__
  File "C:\Users\Surface\PycharmProjects\mne_plot\venv\lib\site-packages\mne\io\nihon\nihon.py", line 316, in __init__
    header = _read_nihon_header(fname)
  File "C:\Users\Surface\PycharmProjects\mne_plot\venv\lib\site-packages\mne\io\nihon\nihon.py", line 136, in _read_nihon_header
    raise ValueError(
ValueError: Not a valid Nihon Kohden EEG file (EEG-1200A V01.00)

Process finished with exit code 1

Additional information

  • Platform: Windows-10-10.0.19041-SP0

  • Python: 3.8.8 (default, Apr 13 2021, 15:08:03) [MSC v.1916 64 bit (AMD64)]

  • Executable: c:\users\surface\anaconda3\python.exe

  • CPU: Intel64 Family 6 Model 126 Stepping 5, GenuineIntel: 8 cores

  • Memory: 15.6 GB

  • mne: 0.23.0

  • numpy: 1.20.1 {blas=mkl_rt, lapack=mkl_rt}

  • scipy: 1.6.2

  • matplotlib: 3.3.4 {backend=Qt5Agg}

  • sklearn: 0.24.1

  • numba: 0.53.1

  • nibabel: 3.2.1

  • nilearn: Not found

  • dipy: Not found

  • cupy: Not found

  • pandas: 1.2.4

  • mayavi: 4.7.3

  • pyvista: Not found

  • vtk: 9.0.1

  • PyQt5: 5.15.4

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