Hi all,
I have continuous eeg data that contain one event.
I did two different epoching for the same event to my EEG data in
EEGLAB. Now after the epoching I got two epoched sets with the same
epochs number but different size for each epoch.
One set contains the event. The other one doesn't contain the event
(because I chose the range of the epoching to be out of the event).
When trying to import the data with mne.io.read_epochs_eeglab(filename)
It imports correctly for the data with events but when trying to
import with the data without events then I get the following error
message:
index 0 is out of bounds for axis 0 with size 0
Hi,
Thanks for the kind reply. I sent the file to you at mailsik at gmail.com
I noticed that in case the epoching is after the
event then the error message is:
IndexError: list index out of range
if the epoching is before the event then I get the following error message:
index 0 is out of bounds for axis 0 with size 0
I get this by running mne.sys_info()
Platform: Windows-10-10.0.17134-SP0
Python: 3.6.7 (default, Feb 28 2019, 07:28:18) [MSC v.1900 64
bit (AMD64)]
Executable: C:\ProgramData\Anaconda3\pythonw.exe
CPU: Intel64 Family 6 Model 69 Stepping 1, GenuineIntel: 4 cores
Memory: 15.9 GB
yes. your file breaks the `mne.io.read_epoch_eeglab` reader.
Here's a Minimum Working Example exposing the issue
import mne
import os.path as op
from mne.externals.pymatreader import read_mat
from mne.utils import Bunch
confidential_path = op.join(op.dirname(mne.__file__), '..', 'sandbox',
'data', 'confidential')
fname = op.join(confidential_path, 'start0.1-0.2.set')
eeg = read_mat(fname, uint16_codec=None)
eeg = Bunch(**eeg['EEG'])
# This condition does not hold and produces buffer overflow
assert len(eeg.epoch) == int(eeg.trials)
Could you open an issue in MNE? It would be great if you could share this
file openly (or generate a sharable file that fails in the same manner)
you should adapt the fname.