question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature request: EGI MFF reader for discontinuous files

See original GitHub issue

Code:

raw = mne.io.read_raw_egi(raw_fname)  # already has an average reference

Result:

---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call last)
<ipython-input-4-0a72d29f7e68> in <module>()
      1 raw_fname = '/media/oreilly/ETUDE/suj1 session1/signal1.bin'
      2 
----> 3 raw = mne.io.read_raw_egi(raw_fname)  # already has an average reference
      4 events = mne.find_events(raw, stim_channel='STI 014')
      5 

~/python_venv/venv-3.4/lib/python3.5/site-packages/mne/io/egi/egi.py in read_raw_egi(input_fname, montage, eog, misc, include, exclude, preload, channel_naming, verbose)

~/python_venv/venv-3.4/lib/python3.5/site-packages/mne/utils.py in verbose(function, *args, **kwargs)
    726         with use_log_level(verbose_level):
    727             return function(*args, **kwargs)
--> 728     return function(*args, **kwargs)
    729 
    730 

~/python_venv/venv-3.4/lib/python3.5/site-packages/mne/io/egi/egi.py in read_raw_egi(input_fname, montage, eog, misc, include, exclude, preload, channel_naming, verbose)
    166                                  exclude, preload, channel_naming, verbose)
    167     return RawEGI(input_fname, montage, eog, misc, include, exclude, preload,
--> 168                   channel_naming, verbose)
    169 
    170 

~/python_venv/venv-3.4/lib/python3.5/site-packages/mne/io/egi/egi.py in __init__(self, input_fname, montage, eog, misc, include, exclude, preload, channel_naming, verbose)

~/python_venv/venv-3.4/lib/python3.5/site-packages/mne/utils.py in verbose(function, *args, **kwargs)
    726         with use_log_level(verbose_level):
    727             return function(*args, **kwargs)
--> 728     return function(*args, **kwargs)
    729 
    730 

~/python_venv/venv-3.4/lib/python3.5/site-packages/mne/io/egi/egi.py in __init__(self, input_fname, montage, eog, misc, include, exclude, preload, channel_naming, verbose)
    182         with open(input_fname, 'rb') as fid:  # 'rb' important for py3k
    183             logger.info('Reading EGI header from %s...' % input_fname)
--> 184             egi_info = _read_header(fid)
    185             logger.info('    Reading events ...')
    186             egi_events = _read_events(fid, egi_info)  # update info + jump

~/python_venv/venv-3.4/lib/python3.5/site-packages/mne/io/egi/egi.py in _read_header(fid)
     66         info['event_codes'] = np.array(info['event_codes'])
     67     else:
---> 68         raise NotImplementedError('Only continuous files are supported')
     69     info['unsegmented'] = unsegmented
     70     info['dtype'], info['orig_format'] = {2: ('>i2', 'short'),

NotImplementedError: Only continuous files are supported

[Tested with a fresh !pip3 install --upgrade git+https://github.com/mne-tools/mne-python.git install]

This is a feature request so that we can read these files with MNE-Python.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:22 (17 by maintainers)

github_iconTop GitHub Comments

1reaction
larsonercommented, Apr 3, 2020

If the signal is all zeros it’s not totally unreasonable at least. It at least uncompressed okay to ~20MB.

1reaction
ViridianForgecommented, Mar 23, 2018

Kind of wandering in here at random, but I’m presently working with Dr. Don Tucker on reading some of these discontinuous .mff files myself.

I can confirm @mmagnuski that an .mff appears to be a folder containing XML describing the data and the signal in .bin files. image

Where I’ve started poking around on our end to try and read a discontinuous file is that epochs.xml - which appears to list the start and stop time of each epoch of data in microseconds (waiting on a Philips Neuro programmer to confirm this), and lists the first and last block contained in that epoch.

If sample data would be helpful, I can consult with Dr. Tucker to see if we have clearance to share one of our smaller .mffs (I think in the realm of 250-500MB).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting started with EGI/Philips data - FieldTrip toolbox
Data in the .egis, .sbin, and .mff formats can be read in by FieldTrip. We don't have details on how well they work,...
Read more >
[Eeglablist] trouble with importing EGI .mff files
If replicable, consider putting it into the eeglab bugzilla as a bug and/or feature request. If one is matlab savvy, then one can...
Read more >
Algorithms and other implementation details - MNE-Python
Preloading continuous (raw) data#. MNE-Python can read data on-demand using the preload option provided in raw reading functions. For example:.
Read more >
ERP PCA Toolkit / Discussion / Help - SourceForge
I haven't been able to get mff to work myself and am still waiting for EGI to send me a test file despite...
Read more >
The HAPPE plus Event-Related (HAPPE+ER) software - NCBI
HAPPE+ER relies on EEGLAB functions for reading in user data, ... Performance of bad channel parameters tested on twenty files from an EGI...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found