[Eeglablist] How can I programatically color all trials for artefact rejection ? (it works in the GUI)
Arnaud Delorme
arno at ucsd.edu
Wed Oct 15 16:03:15 PDT 2014
Hi Camilla,
The easiest is to disable plotting in these two calls, then use the function eeg_rejsuperpose to overlay the results and call eegplot or pop_eegplot. The code is available in the pop_rejmenu function.
Arno
On Oct 9, 2014, at 12:09 PM, Camilla Rotvel <caro at eng.au.dk> wrote:
> Hi,
>
> I would like to make a semiautomated artefact rejection script in MATlab. I import a dataset which is already epoched into EEGlab:
>
> EEG = pop_loadset(file);
>
> EEG = eeg_checkset( EEG );
> [EEG ExtremeValue_reject_index] = pop_eegthresh(EEG,1,[1:124] ,-50,50,-0.80078,1.6953,1,0);
>
> [EEG, ~, trend_reject_index] = pop_rejtrend(EEG,1,[1:124] ,640,50,0.3,1,0,1);
> EEG = eeg_checkset( EEG );
>
> A window opens, but only the ‘rejtrend’-detected epochs are colored. I would prefer that the eegthresh-detected epochs were also colored. I have successfully made the scroll-plot with the GUI (Tools -> Reject data epochs -> Reject data (all methods) -> “Show all trials marked for rejection by the measure selected above or checked below”, and only check “abnormal data”, “abnormal values” and “abnormal trends”. Here is a picture:https://www.dropbox.com/s/jlo90hwwn7t8bq7/plot.png?dl=0
>
> Unfortunately EEG.history does not provide me with the right script, which is the script I have already posted here, and as already mentioned it only colors the ‘rejtrend’-detected epochs. I have checked EEG.reject, and both the eegthresh and rejtrend-data are there, but somehow it gets lost when I‘m plotting from the script.
>
> I appreciate any and all help !
> Camilla Rotvel
>
> ___________________________________________
> Camilla Arndal Rotvel
> Ph.D. student at DuPont Nutrition Biosciences
> Edwin Rahrs Vej 38, DK-8220 Brabrand
>
> Aarhus University
> Edison, Room 201, Finlandsgade 22, DK-8200 Aarhus N
>
> Phone : + 45 21543280
> E-mail : caro at eng.au.dk
> ___________________________________________
>
> _______________________________________________
> 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/20141015/2b99d8d9/attachment.html>
More information about the eeglablist
mailing list