[Eeglablist] Is there a list of rejected epochs?

Stephen Politzer-Ahles spa268 at nyu.edu
Wed Apr 30 12:21:40 PDT 2014

Hi Dagfinn,

If you removed the rejected epochs, then there's not really a list, but
there are ways you can still figure out which ones were removed. The
EEG.event structure has a field called 'urevent' which indicates what the
epoch number of an epoch was originally...so for example, if you removed
the epoch corresponding to the 2nd event, then what is the second epoch in
your new dataset might have an urevent value of 3 (since it was originally
the 3rd epoch), and based on the fact that the epochs go from urevent==1 to
urevent==3 then you can figure out that the epoch corresponding to event #2
was removed. This is pretty straightforward if your data only consist of
one event per epoch, and every event corresponds to an epoch; if you have
multiple events in a single epoch (for example if your epochs overlap, or
if you sent more triggers than just the time-locking events) then it could
get complicated.

If that doesn't work, a really hack-ish thing you can try is to open both
the original data file and the post-artifact-rejection file, and one at a
time compare the values for one epoch to the corresponding epoch in the
original file, to see which epochs in the original file got skipped and
don't appear in the new file. It takes a little more coding but it is

Finally, another option (although maybe too late for your present purpose)
is to not actually remove the bad epochs, but just mark them; then
EEG.reject.rejectmanual (for example) contains a list of which epochs were
marked for rejection (I like to save this list to a text file for each
dataset), and at some later stage of data analysis you can exclude the
marked epochs.


Stephen Politzer-Ahles
New York University, Abu Dhabi
Neuroscience of Language Lab

On Wed, Apr 30, 2014 at 10:18 PM, Dagfinn Matre <Dagfinn.Matre at stami.no>wrote:

>  Hi
>  I have an epoched dataset and have rejected epochs that contained
> artifacts. Thereafter I have saved the new dataset. This has been done to a
> bunch of files.
>  Now, afterwards, I would like to know which epochs that was deleted. Is
> there a list of rejected in the EEG variable conained in the set-file?
>  Best,
> Dagfinn
>  Dagfinn Matre, PhD
> Forsker/Research scientist
> Statens arbeidsmiljøinstitutt/Nat Inst of Occupational Health
> P.O. Box 8149 Dep.
> N-0033 Oslo, Norway
> T: +47 23 19 52 15/F: +47 23 19 52 04/M: +47 47 23 60 47
> E: dagfinn at stami.no
> _______________________________________________
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to
> eeglablist-unsubscribe at sccn.ucsd.edu
> For digest mode, send an email with the subject "set digest mime" to
> eeglablist-request at sccn.ucsd.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20140430/034c353c/attachment.html>

More information about the eeglablist mailing list