[Mne_analysis] events lost in epoching ?

Denis-Alexander Engemann denis.engemann at gmail.com
Wed Jan 6 07:47:33 EST 2016
Search archives:

Hi,

I'm not sure I fully understand it, but I respond with a comment on the
semantics of epoching in MNE.
The Epochs are based on the events passed to the the events id parameter.
The idea is that the length of the first dimension of the data array and
the events is the same.
In other words, `epochs.events` is only regarding the events that you
epoched on in chronological order.
What you describe is thus consistent with the API design.
This being said, we have discussed for some time already adding an API for
annotations to support describing events that are inside the time window of
interest used for epoching.

I hope this helps.
Cheers,
Denis



On Wed, Jan 6, 2016 at 12:54 PM, Boris BURLE <boris.burle at univ-amu.fr>
wrote:

> Dear list,
>
> When epoching data based on a given trigger, it seems that all other
> events that were present in the epochs are lost.
>
> Below an example: in the raw data, I have three type of events, coded
> '1', '10', and '101'. I epoch on event '1'. Events '10' and '101' are
> close enough from event '1' and should fall on the epoched data.
> However, the event list of the epoch object only contains the events
> that were used to epoch ('1').
>
> Am I using mne.Epochs in a wrong way? Is it an intended feature? If so,
> this is unfortunate since, for example, if even '101' is the response
> (and '1' the stimulus), I completely loose the Reaction Time.
>
> Is there a way to keep all events in the epoched data?
>
>         Thanks in advance for your help,
>                 B.
>
>
> In [67]: raw._events
> Out[67]:
> array([[  1001,      1,      1],
>         [  1763,      1,     10],
>         [  1845,      1,    101],
>         ...,
>         [526001,      1,      1],
>         [526401,      1,     10],
>         [526485,      1,    101]])
>
>
> In [68]: event_id
> Out[68]:
> {'EMG': 10,
>   'Left_Resp': 1,
>   'PC_CompLeft': 1,
>   'PC_CompRight': 2,
>   'PC_IncompLeft': 3,
>   'PC_IncompRight': 4,
>   'Right_Resp': 2}
>
>
> In [69]: t0
> Out[69]: {'PC_CompLeft': 1}
>
>
> In [70]: epochs = mne.Epochs(raw,raw._events,t0,-.5,1.5)
> 211 matching events found
> Adding average EEG reference projection.
> Created an SSP operator (subspace dimension = 1)
> 1 projection items activated
>
> In [71]: epochs.events
> Out[71]:
> array([[  1001,      1,      1],
>         [  3501,      1,      1],
>         [  6001,      1,      1],
>         [  8501,      1,      1],
>         [ 11001,      1,      1],
>         [ 13501,      1,      1],
>         [ 16001,      1,      1],
>         [ 18501,      1,      1],
>         [ 21001,      1,      1],
>         [ 23501,      1,      1],
>         [ 26001,      1,      1],
>         [ 28501,      1,      1],
>         [ 31001,      1,      1],
>         [ 33501,      1,      1],
>         [ 36001,      1,      1],
>         [ 38501,      1,      1],
>         [ 41001,      1,      1],
>         [ 43501,      1,      1],
>         [ 46001,      1,      1],
>         [ 48501,      1,      1],
>         [ 51001,      1,      1],
>         [ 53501,      1,      1],
>         ...
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>
>
> The information in this e-mail is intended only for the person to whom it
> is
> addressed. If you believe this e-mail was sent to you in error and the
> e-mail
> contains patient information, please contact the Partners Compliance
> HelpLine at
> http://www.partners.org/complianceline . If the e-mail was sent to you in
> error
> but does not contain patient information, please contact the sender and
> properly
> dispose of the e-mail.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20160106/7f788600/attachment.html 


More information about the Mne_analysis mailing list