Just replying to this because I encountered a similar issue in 0.24.1 and found a hack fix. Excluding event channels in read_raw_egi() doesn’t help, because the error occurs at data load while exclude_list is only used later, when reading events. The hack is to manually add in the exclusion to mne/io/egi/events.py, under the for loop in _read_events():
for n, event in enumerate(event_codes):
if event == ‘IEND’:
continue
for i in mff_events[event]:
print(n, i)
events[n][i] = n + 1
A better fix might be to include the exclude list when calling _read_events()… in egimff.py… but I don’t know enough about the code base to make sure that won’t break stuff. Also, I think this happens because the EGI software adds triggers after the end of the signal, but I’m not sure why only some data files raise the error.
IndexError Traceback (most recent call last)
in
5
6
----> 7 raw = mne.io.read_raw_egi(DATAPATH_WIS / f’WIS_{SUBJECT}.mff’, preload=True, verbose=2)
8
9
in read_raw_egi(input_fname, eog, misc, include, exclude, preload, channel_naming, verbose)
c:\users\wesley\anaconda2\envs\python3\lib\site-packages\mne\io\egi\egi.py in read_raw_egi(input_fname, eog, misc, include, exclude, preload, channel_naming, verbose)
155 if input_fname.endswith(’.mff’):
156 return _read_raw_egi_mff(input_fname, eog, misc, include,
→ 157 exclude, preload, channel_naming, verbose)
158 return RawEGI(input_fname, eog, misc, include, exclude, preload,
159 channel_naming, verbose)
in _read_raw_egi_mff(input_fname, eog, misc, include, exclude, preload, channel_naming, verbose)
c:\users\wesley\anaconda2\envs\python3\lib\site-packages\mne\io\egi\egimff.py in _read_raw_egi_mff(input_fname, eog, misc, include, exclude, preload, channel_naming, verbose)
374 “”"
375 return RawMff(input_fname, eog, misc, include, exclude,
→ 376 preload, channel_naming, verbose)
377
378
in init(self, input_fname, eog, misc, include, exclude, preload, channel_naming, verbose)
c:\users\wesley\anaconda2\envs\python3\lib\site-packages\mne\io\egi\egimff.py in init(self, input_fname, eog, misc, include, exclude, preload, channel_naming, verbose)
396
397 logger.info(’ Reading events …’)
→ 398 egi_events, egi_info = _read_events(input_fname, egi_info)
399 cals = _get_eeg_calibration_info(input_fname, egi_info)
400 logger.info(’ Assembling measurement info …’)
c:\users\wesley\anaconda2\envs\python3\lib\site-packages\mne\io\egi\events.py in _read_events(input_fname, info)
30 for n, event in enumerate(event_codes):
31 for i in mff_events[event]:
—> 32 events[n][i] = n + 1
33 return events, info
34
IndexError: index 751743 is out of bounds for axis 0 with size 751717