Rejecting epochs in which particular events occur

Hello all,

Let's say I have an epochs object for which each epoch starts some time
before (tmin) and ends some time after (tmax) the onset of a given target
(defines 0 ms). And, I have an events array constructed from a STI 014
channel, which contains several events, each indicative of a separate
participant error. These error events can occur in the range of tmin and
tmax. In fact, I only care when they do because I want to reject epochs in
which errors occur.

How do I reject these 'error epochs'? I can certainly think of ways of
doing it, but they all seem to require too much work.

Ultimately, I want a way to reject an epoch from a epochs object in which a
particular event occurs.

Thanks,

*Ghislain d'Entremont*
BSc, Neuroscience, Honors
Dalhousie University
tel: 902-802-5671 (text)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20160727/8fc4bf42/attachment.html

We currently have some support for rejecting epochs during which certain
things occur using the Annotations class. So if you take your
error-indicating events and turn them into an Annotations instance, you
should be able to associate that with your Raw object, which can then make
epochs get rejected during the Epochs stage. See:

http://martinos.org/mne/dev/generated/mne.Annotations.html#mne.Annotations

And also an example that uses them:

http://mne-tools.github.io/stable/auto_tutorials/plot_brainstorm_auditory.html

If it's not clear from this, feel free to open an MNE-Python issue and
hopefully we can make use of the Annotations class clearer.

Eric