[Eeglablist] Segment continuous EEG data into epochs based on triggers

Stephen Politzer-Ahles politzerahless at gmail.com
Tue Jun 19 06:11:06 PDT 2018


Based on your description of your data, it sounds like you should follow
Arno's advice to remove portions of data. You could write a script that
finds where there is a 101, then finds the subsequent 100, removes the data
between them, and then repeats this process through the whole file (and
does the same thing, separately, with 103 and 102) until all the data not
of interest have been removed.


---
Stephen Politzer-Ahles
The Hong Kong Polytechnic University
Department of Chinese and Bilingual Studies
http://www.mypolyuweb.hk/~sjpolit/
<http://www.nyu.edu/projects/politzer-ahles/>

On Tue, Jun 19, 2018 at 2:51 PM, yadwinder kaur <yadwinder.k2 at gmail.com>
wrote:

> Dear Ramon,Stephen and Arnaud
>
> Thanks for your prompt replies.
> @Arnaud , My aim is to extract data segments from S100 to S102 and S101 to
> S103.
> S100 is the trigger for onset of cued stimulus and S102 is the trigger
> when participant started typing the response.Same applies for S101 (onset
> of non-cued stimulus) S103 (paticipant started typing).
> As there was no time limit for participant to response, hence the length
> of segments from S100 to S102 differs for each subject.
> My aim is to extract the data segments from S100 to S102 as cued  and S101
> to S103 as non cued segment and concatenate them together which would give
> me one long segment of cued and another of non cued.
> I hope this information was clear. What do you suggest now?
>
> Thanks
> Regards
> Yadwinder
>
>
>
> On Fri, Jun 15, 2018 at 9:52 PM Arnaud Delorme <arno at ucsd.edu> wrote:
>
>> Hi Stephen and Yadwinder,
>>
>> Yes, in EEGLAB you can create discontinuous data segments, but you cannot
>> create epochs of varying length (although see next paragraph below). The
>> reason is that, when performing ERP or ERSP analysis, you would be
>> averaging over different number of trials, possibly adding noise at the
>> lower and upper time limits where there might be few trials (so what you
>> really want to look at is the region where all data epochs are included -
>> and in this case, you might as well create epochs of the same length). The
>> other reason is that we wanted people to easily manipulate the EEG raw data
>> from the command line. Data epochs of the same length may be stored in a
>> single Matlab matrix, but epochs of different length cannot (and in fact
>> they are stored in a cell array of matrices in Fieldtrip).
>>
>> But, according to your original message, Yadwinder, I am not sure your
>> epochs have different lengths. For instance, if the number of sample
>> between 'S100' and 'S102' and between 'S101' and 'S103’ is constant, you
>> may simply extract epochs of a given length time locked to ‘S100’ and
>> ‘S101’. If the number of samples between these pairs of event is not
>> constant, you can in EEGLAB have concatenated epochs of different lengths.
>> There is no menu to extract such epochs, so you might have to write a
>> script. Basically, you would want to remove portions of data between
>> selected event types.
>>
>> Best wishes,
>>
>> Arno
>>
>> > On Jun 14, 2018, at 6:18 PM, Stephen Politzer-Ahles <
>> politzerahless at gmail.com> wrote:
>> >
>> > I'm not sure it's possible in EEGLAB to make epochs with varying
>> durations. It is possible in FieldTrip, though.
>> >
>> >
>> > ---
>> > Stephen Politzer-Ahles
>> > The Hong Kong Polytechnic University
>> > Department of Chinese and Bilingual Studies
>> > http://www.mypolyuweb.hk/~sjpolit/
>> >
>> > On Thu, Jun 14, 2018 at 4:10 PM, yadwinder kaur <yadwinder.k2 at gmail.com>
>> wrote:
>> > Dear EEGLAB users
>> >
>> > I have continuous EEG data with  triggers labeled as
>> ''S100','S101,'S102','S103'. I want to segment the data into different
>> epochs so that startepoch : 'S100' to endepoch 'S102' and another one as
>> startepoch 'S101' to endepoch 'S103' and generate a total of 72 epochs. and
>> at the end, I want to concatenate these trials: every epoch (S100 to S102)
>> and (S101 to S103). I would appreciate any help here.
>> >
>> > Thanks
>> >
>> > Regards
>> > Yadwinder
>> >
>> >
>> >
>> > _______________________________________________
>> > 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
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20180619/1a5f4e3f/attachment.html>


More information about the eeglablist mailing list