# importing epoched data without events

**URL:** <https://mne.discourse.group/t/importing-epoched-data-without-events/1819>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [April 17, 2019, 11:34am UTC](https://mne.discourse.group/t/importing-epoched-data-without-events/1819 "2019-04-17T11:34:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [April 17, 2019, 11:34am UTC](https://mne.discourse.group/t/importing-epoched-data-without-events/1819/1 "2019-04-17T11:34:59Z")

</div>

External Email - Use Caution

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

How to solve this? Many many thanks for any help.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [April 17, 2019, 11:37am UTC](https://mne.discourse.group/t/importing-epoched-data-without-events/1819/2 "2019-04-17T11:37:29Z")

</div>

External Email - Use Caution

can you share the file?

what version of mne are you suing (can you run `mne.sys_info()` for me)?

Thx

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [April 17, 2019, 12:09pm UTC](https://mne.discourse.group/t/importing-epoched-data-without-events/1819/3 "2019-04-17T12:09:01Z")

</div>

External Email - Use Caution

Hi,  
Thanks for the kind reply. I sent the file to you at mailsik at [gmail.com](http://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

mne: 0.17.1  
numpy: 1.16.2 {blas=mkl\_rt, lapack=mkl\_rt}  
scipy: 1.2.1  
matplotlib: 3.0.3 {backend=module://ipykernel.pylab.backend\_inline}

sklearn: 0.20.2  
nibabel: 2.3.3  
mayavi: Not found  
cupy: Not found  
pandas: 0.24.1  
dipy: 0.15.0

Many many thanks in advance for any help

Sik \<mailsik at [gmail.com](http://gmail.com)\>, 17 Nis 2019 ?ar, 13:38 tarihinde ?unu yazd?:

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [April 17, 2019, 3:09pm UTC](https://mne.discourse.group/t/importing-epoched-data-without-events/1819/4 "2019-04-17T15:09:30Z")

</div>

External Email - Use Caution

yes. your file breaks the `mne.io.read_epoch_eeglab` reader.

Here's a Minimum Working Example exposing the issue

```auto
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.

Best, sik.
