[Eeglablist] How to re-mask ersp output

James Desjardins jdesjardins at brocku.ca
Fri Jul 6 20:18:31 PDT 2012


Hi Mash,

There may be a more elegant ways of achieving this, but the following works:



%PERFORM TIMEF CALCULATION (E.G. IC 13 FOR ONE CONDITION)...
figure;
[ersp,itc,powbase,times,freqs,erspboot,itcboot,itcphase] = ...
                  timef(EEG.icaact(13,:,:), ...
		       EEG.pnts, ...
		       [EEG.xmin*1000 EEG.xmax*1000], ...
		       EEG.srate,[3,.5], ...
		       'freqs',[3 30], ...
		       'alpha',.01);


%FLAG ERSP VALUES THAT ARE BELOW THE LOWER CONFIDENCE INTERVAL [x(:,:,1)]
for i=1:length(times);x(:,i,1)=ersp(:,i)'<erspboot(1,:);end

%FLAG ERSP VALUES THAT ARE ABOVE THE UPPER CONFIDENCE INTERVAL [x(:,:,2)]
for i=1:length(times);x(:,i,2)=ersp(:,i)'>erspboot(2,:);end

%CREATE CRIT ARRAY WHERE '1's FLAG THE TF COORDINATES OF SIGNIFICANCE...
crit=double(any(x,3));

%PLOT THE ERSP ARRAY...
figure;
surf(times,freqs,ersp,'LineStyle','none');
axis tight;
view(0,90);

%PLOT THE CRIT ARRAY...
figure;
surf(times,freqs,crit,'LineStyle','none');
axis tight
view(0,90)

%PLOT THE MASKED ERSP ARRAY...
figure;
surf(times,freqs,ersp.*crit,'LineStyle','none');
axis tight
view(0,90)



-- 
James Desjardins, MA
Technician, Cognitive and Affective Neuroscience Lab
Department of Psychology, Behavioural Neuroscience
Brock University
500 Glenridge Ave.
St. Catharines, ON, Canada
L2S 3A1
905-688-5550 x4676


Quoting "Mash, Clay (NIH/NICHD) [E]" <mashc at mail.nih.gov>:

> From:   >>timef details,
>
> "If bootstrap statistics are computed (via the 'alpha'   probability  
>  input parameter), (time, freq) points with non-significant     
> differences from 0 are colored green in the image (but not in the   
> 'ersp'   output variable - use the output 'erspboot' variable to   
> re-mask the 'ersp' output if desired)."
>
> How do you re-mask the ersp output?  I would like to report the freq  
>  x time coordinates of the significant differences between conditions.
>
>
> Clay Mash
>
> _______________________________________________
> 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