[Eeglablist] Automated way of placing events
Andrew Hill
andrewhill at ucla.edu
Sat May 5 18:54:39 PDT 2012
Marco,
You can do this a lot more easily using ERPLAB's "Bin Operator" to add / redefine labels based on conditional logic of event, timing, etc. Check out erpinfo.org for the plugin.
The workflow is like this
- create a "binlist" (list of events in a text file with labels)
- assign that binlist to a continuous event file
- epoch the continuous file per the bins assigned, and average to ERPs
- then you would run conditional code to re-define your bins and apply it to the ERP file.
for example:
%add ERPLab event structure
EEG = pop_creabasiceventlist(EEG, '', {'boundary'}, {-99});
% "bindesc.txt" contains numeric and text labels for each event
EEG = pop_binlister( EEG, 'LANT_bindesc.txt', 'no', '', 0, [], [], 0, 0, 0);
%cut continuous file into epoched file - resulting in a single file, unlike the epoching of EEGLAB
EEG = pop_epochbin( EEG , [-1500 1500], [-0.1 0]);; %3-sec epohcs, baselined 100 ms pre-stim
EEG = eeg_checkset( EEG );
%Create ERPs
ERP = pop_averager( EEG,1,1,1);
% difference wave subtraction - you can create new ERPs not in the original epochs, here.
ERP = pop_binoperator( ERP, {'bin10 = bin1 - bin3 labels OrientingCost LVF' 'bin11 = bin7 - bin9 labels OrientingCost RVF' });
ERP = pop_savemyerp(ERP, 'erpname', inputfilename, 'filename', [OUTPUTFILEPATH erpfilename]);
Good luck - hope this helps!
Best,
andrew
On May 5, 2012, at 2:33 PM, Marco Montalto wrote:
> Dear List,
>
> In my experiment I have three conditions and each trial is 30 seconds long. I ignore the first and last 10 seconds of each block and the middle 10-second block I divide into epochs of 2-second duration. Currently I am doing this manually through the EEGLAB GUI by placing an event (with the same 'type' for blocks from the same condition) at every two seconds (in the middle 10-second block) and then extracting epochs around those events. Would anyone know whether there is a more automated and a faster way of doing this? Thanks in advance.
>
> Regards,
> Marco Montalto
> _______________________________________________
> 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/20120505/0cd30b3f/attachment.html>
More information about the eeglablist
mailing list