[Eeglablist] pop_rejepoch

Bradley Voytek bradley.voytek at gmail.com
Thu Nov 5 09:58:15 PST 2009


Piotr:

I believe the array of 0s and 1s is implicit in that it's within the
EEG structure itself. So when the "pop" version of rejepoch is called,
the EEG structure variable is given as the input, and then the
EEG.reject substructure contains logical arrays that are used to
remove trials.

One quick method to identify and then reject trials would be something like:

EEG = pop_eegthresh(EEG, 1, [1:EEG.nbchan], -100, 100, EEG.xmin,
EEG.xmax, 0, 0);
EEG = pop_select(EEG, 'notrial', find(EEG.reject.rejthresh));

where the first line identifies any trials within the EEG dataset
whose values fall outside +/- 100uV. This creates a logical vector in
EEG.reject.rejthresh where 1s are trials that have such extreme
values. The second line of code then finds any trials that the first
line marked as artefactual and removes them from the dataset.

Best,

::brad


On Wed, Nov 4, 2009 at 10:53, Piotr Jaskowski <jaskowski at vizja.pl> wrote:
> Hi All,
>
>                I want to write a script using dataset history. A part of it
> is
>
>
>
> EEG = pop_rejepoch(EEG,[2 10 37 etc.], 0);
>
>
>
> In the help I found that the second input parameter is “Array of 0s and 1s
> (depicting rejected trials) (size is number of trials)”. First, I see no 0s
> and 1s. I expect these are epoch number to be rejected. Second, if it is
> true, then the next problem is how should I call this routine in the script
> if I don’t know in advance which epochs should be rejected. I expect that if
> I call it as it is with another dataset, the routine will remove the same
> epochs as in the previous dataset, that is 2nd, 10th, 37th etc.
>
>                Could anyone help me with this problem?
>
>
>
> Best,
>
> Piotr Jaskowski
>
>
>
> ---------------------------------------------------
>
> Prof. Piotr Jaskowski, Ph.D.
>
> Department of Cognitive Psychology
>
> University of Finance and Management
>
> Pawia 55, 01-030 Warszawa, Poland
>
> http://cogn.vizja.pl
>
>
>
>
>
>
> --
>
> Specjalna oferta ksiazek i podrecznikow: http://oferta.vizja.net.pl
>
>
>
>
>
> _______________________________________________
> 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