[Eeglablist] Question about sorting epochs

Renzo Lanfranco renzo.lanfranco at gmail.com
Wed Mar 29 04:52:48 PDT 2023


Dear EEGLAB community,



I was wondering if you could help me with something. I have EEG datasets
that need an unconventional treatment before analysis. In this experiment,
participants hear a beep (event 1), and 2 seconds later, a series of 5
stimuli are shown, with 1 second of separation in between (events from 2 to
6). After pre-processing and epoching, epochs with event label 1 are 2000
ms long (from 0 to 2000 ms, no stimulus) and the other epochs are 1000 ms
long (from -500 to +500 ms, where time zero indicates stimulus
presentation).



How can I average across all the epochs with event label 1, 2, 3, 4, 5, and
6, and then copy the epochs with event label 1 to every other epoch so the
resulting epochs are 2000 ms (duration of epoch 1) + 1000 ms (duration of
each stimulus epoch)? Thus, we’d have resulting epochs of -2000 ms to +1000
ms. The objective is to use the epoch with event number 1 as baseline for
the stimulus-related epochs (event numbers 2, 3, 4, 5, and 6).



Thank you so much!



Best,

Renzo



More information about the eeglablist mailing list