[Mne_analysis] Fwd: importing epoched data without events

Sik mailsik at gmail.com
Wed Apr 17 11:09:30 EDT 2019
Search archives:

        External Email - Use Caution        

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

Here's a Minimum Working Example exposing the issue

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


On Wed, Apr 17, 2019 at 2:09 PM A S <eng.emetsasa at gmail.com> wrote:

>         External Email - Use Caution
>
> 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
>
> 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>, 17 Nis 2019 Çar, 13:38 tarihinde şunu yazdı:
> >
> >         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
> >
> > On Wed, Apr 17, 2019 at 1:35 PM A S <eng.emetsasa at gmail.com> wrote:
> >>
> >>         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.
> >>
> >> _______________________________________________
> >> Mne_analysis mailing list
> >> Mne_analysis at nmr.mgh.harvard.edu
> >> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
> >
> > _______________________________________________
> > Mne_analysis mailing list
> > Mne_analysis at nmr.mgh.harvard.edu
> > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20190417/791d689c/attachment.html 


More information about the Mne_analysis mailing list