[Eeglablist] Question about sorting epochs

Cedric Cannard ccannard at protonmail.com
Tue Apr 4 11:25:05 PDT 2023


Hi Renzo,

This is very specific and requires custom-made code, which requires time, which no one has. 

Send a quick description of your events with their names, and I'll try to get you a quick draft code.
Save the EEG.event structure (after importing your data) and send it to me in a private email. You can save it manually or with with: 

my_events = EEG.event;
save(fullfile('folder_where_you_want_to_save_it', 'my_events.mat'), 'my_events');


Cedric



------- Original Message -------
On Tuesday, April 4th, 2023 at 2:45 AM, Renzo Lanfranco <renzo.lanfranco at gmail.com> wrote:


> Hi Arno,
> 
> Thanks for the reply! About the second part of your answer, the problem is
> that these stimuli are applied in series (to induce an illusion), so the
> baseline of each of those epochs is contaminated by the stimulus applied
> before. Therefore, I want to use those 2 seconds of wait at the beginning
> of the trial as the baseline for each stimulus event. Each trial has 2
> seconds of no stimulus, then a series of 5 stimuli. Epoched, it would be
> one segment of 2 s and five segments of 1 s each (the stimulus' of the
> event is at time zero there). Then copy the 2-s-long segment and paste it
> at the beginning of each stimulus segment, so we end up with five 3-s-long
> epochs. I wonder if anyone has a script for this.
> 
> Best,
> Renzo
> 
> --
> 
> 
> 
> 
> On Tue, 4 Apr 2023 at 07:59, Arnaud Delorme via eeglablist <
> eeglablist at sccn.ucsd.edu> wrote:
> 
> > > 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
> > 
> > This is best done by creating an EEGLAB study (which can be created with 1
> > participant only).
> > Then you can compare epochs 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).
> > 
> > This would require a script.
> > It is unclear what you are trying to do. If it is a standard ERP baseline,
> > you can extract very long epochs with events 1, 2, 3, 4, 5, and 6 compute
> > the baseline, then extract smaller epochs.
> > 
> > Cheers,
> > 
> > Arno
> > _______________________________________________
> > 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
> 
> _______________________________________________
> 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



More information about the eeglablist mailing list