[Eeglablist] How to use 'eventindices' flag in pop_epoch

James Jones-Rounds jj324 at cornell.edu
Wed May 2 12:14:55 PDT 2012


Hello all, and Steve Politzer-Ahles,

Thank you for your advice on how to resolve my trouble with using the
'eventindices' flag in pop_epoch.

I eventually simplified my use of pop_epoch, and chose to use:

epochLimits = [-1, 11.2];
EEG = pop_epoch(EEG, {'2AA', '2AN', '2NA', '2NN'}, epochLimits);

This required that I used a separate piece of code to accurately modify the
EEG.event.type fields, so that by choosing {'2AA', '2AN', '2NA', '2NN'} in
pop_epoch, I thereby pulled just the trials that I wanted.

Thank you,

James

On Sat, Apr 28, 2012 at 3:31 PM, Stephen Politzer-Ahles <
politzerahless at gmail.com> wrote:

> Hi James,
>
> Have you tried instead using pop_select()? i.e.,
>
> EEG = pop_select( EEG, 'trial', epochsArray);
>
> This is what I have used in the past to do something similar to what you
> are trying to do.
>
> Best,
> Steve
>
> On Thu, Apr 26, 2012 at 4:30 PM, James Jones-Rounds <jj324 at cornell.edu>wrote:
>
>> Hello EEGLAB users and experts,
>>
>> I am having trouble using the 'eventindices' flag for the function
>> pop_epoch, in a script I'm writing to set up some analyses for EMG data
>> analysis.
>>
>> The documentation indicates that the use of this optional flag should
>> proceed:
>> 'eventindices'- [int indices] Extract data epochs time locked to the
>> indexed event numbers.
>>
>> 1) What does the "int" component mean? I assumed I should just provide a
>> vector of integers corresponding to the event indices I want extracted, but
>> I get this error when I try that: "pop_epoch(): wrong syntax in function
>> arguments"
>>
>> I included a list of indexed event numbers (in this case every 6th event
>> starting with the 2nd event), which I generated with this line:
>> epochlimits = [-1, 11.2];
>> epochsArray = (2:6:236);
>> ...
>> EEG = pop_epoch(EEG, 'eventindices', epochsArray, epochlimits);
>>
>> Can anyone advise on how to use this flag?
>>
>> 2) Alternatively, I would like to know how to extract epochs using
>> information from the "urevent" field, if anyone has had success attempting
>> that.
>>
>> Thank you very much!
>>
>> James Jones-Rounds
>>
>> --
>> Lab Manager
>> Human Development EEG & Psychophysiology (HEP) Laboratory,
>> Department of Human Development,
>> --------------------------------------------
>> Technician and Lab Safety Officer
>> Computational Physiology Laboratory,
>> Department of Neurobiology & Behavior,
>> --------------------------------------------
>> Cornell University | Ithaca, NY
>>
>>
>> _______________________________________________
>> 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
>>
>
>
>
> --
> Stephen Politzer-Ahles
> University of Kansas
> Linguistics Department
> http://www.linguistics.ku.edu/
>



-- 
Lab Manager
Human Development EEG & Psychophysiology (HEP) Laboratory,
Department of Human Development,
--------------------------------------------
Technician and Lab Safety Officer
Computational Physiology Laboratory,
Department of Neurobiology & Behavior,
--------------------------------------------
Cornell University | Ithaca, NY
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20120502/f2f5a652/attachment.html>


More information about the eeglablist mailing list