[Eeglablist] Delete data from (the middle of) epochs

Andreas Widmann widmann at uni-leipzig.de
Sat Oct 20 14:09:14 PDT 2018


Hi Sebastian,

on the command line it is possible to cut data the way you describe. Here however, I do not think that this is actually necessary. If I correctly understand your description type 1 and type 2 events always come in pairs and you want to use the baseline of the type 1 event for each subsequent type 2 event. Why not epoching your data two times (from raw data or your long epochs), once for the type 1 events and once for the type 2 events and then copying the baseline interval from the first dataset to the second dataset? On the command line this breaks down to one line. Something like this should work:

ALLEEG( 2 ).data( :, 1:100, : ) = ALLEEG( 1 ).data( :, 1:100, : );
[ ALLEEG EEG CURRENTSET ] = pop_newset( ALLEEG, EEG, CURRENTSET )
eeglab redraw

Does this help? Best,
Andreas

> Am 15.10.2018 um 22:49 schrieb Sebastian Sauppe <sauppe.s at gmail.com>:
> 
> Dear EEGLAB list members,
> 
> is it possible to delete segments of data for already epoched data?
> 
> I am trying to do a rather unconventional thing that, however, makes sense for my project. I have EEG data from an experiment where participants listened to sentences and I want to extract two different kinds of epochs (time locked to different points in the sentences). I first extracted epochs that are long enough to have all data points for both kinds of time-locking and used these epochs for ICA and artifact correction. These epochs are already time-locked to the first event of interest. The second event of interest occurs at different times in different epochs and I know how to shift the event markers so that I can time-lock to this second event.
> 
> However, I need to take a segment before the first event as the baseline. When I simply shift the events with different latencies in different trials its not straightforward to keep the baseline segment. So I was thinking that the easiest way would be to just delete the data points between the first event and the second event so that the epoch goes from 
> 
> data_pre-event1
> event1
> data_between_event1_and_event2
> event2
> data_post-event2
> 
> to
> 
> data_pre-event1
> event2
> data_post-event2
> 
> The resulting epochs would then all be of the same length again (200 ms baseline and 1000 ms after event2).
> 
> I didn’t find any command that would accomplish this. Does anyone of you know how to cut out data points from epochs?
> 
> Unfortunately, subtracting the baseline before shifting the event triggers is not an option because I want to follow Alday’s recommendation of not subtracting the baseline but including it as a predictor in a regression model (https://arxiv.org/abs/1707.08152).
> 
> Regards,
> Sebastian
> 
> -----------
> Dr. Sebastian Sauppe
> Department of Comparative Linguistics, University of Zurich
> Homepage: https://sites.google.com/site/sauppes/
> Twitter: @SebastianSauppe
> Google Scholar Citations: https://scholar.google.de/citations?user=wEtciKQAAAAJ 
> ResearchGate: http://www.researchgate.net/profile/Sebastian_Sauppe
> ORCID ID: http://orcid.org/0000-0001-8670-8197
> 
> _______________________________________________
> 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