[Eeglablist] FW: How can I programatically color all trials for artefact rejection ? (it works in the GUI)
Camilla Rotvel
caro at eng.au.dk
Thu Oct 9 12:09:55 PDT 2014
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<mailto:caro at eng.au.dk>
___________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20141009/9f8719f4/attachment.html>
More information about the eeglablist
mailing list