[Eeglablist] Plotting ERSP condition differences in STUDY

Arnaud Delorme arno at ucsd.edu
Mon Feb 25 21:07:54 PST 2013


Dear Pete,

something like this could help for single channels

[STUDY ersp times freqs] = std_erspplot(STUDY,ALLEEG, 'channels',{'OZ'});
erspDiff = ersp{2}-ersp{1};
erspDiff = mean(erspDiff, 4); % average across subjects
figure; tftopo(erspDiff, times, freqs);

For scalp topographies

chanlocs = eeg_mergelocs(ALLEEG.chanlocs);
[STUDY ersp times freqs] = std_erspplot(STUDY,ALLEEG, 'channels',{ chanlocs.labels }, 'topotime', [200 400], 'topofreq', [8 12]);
erspDiff = ersp{2}-ersp{1};
erspDiff = mean(erspDiff, 4);
figure; topoplot(erspDiff, chanlocs);

Best,

Arno

On 25 Feb 2013, at 18:39, Makoto Miyakoshi wrote:

> Dear Pete,
> 
> This is what I wrote 5 days ago for a similar question to the list. I hope this helps.
> 
> %%%%%%%%%%%%%%%%%%%%
> If you don't mind doing a little hack here is description of how to do it. Here I show you the case of ICA-based clustering, not channel, but they should be more or less the same I guess (I hope).
> 
> 1. Plot 'Edit/plot clusters.'
> 2. Show all ERSPs.
> 3. Close it by pressing 'ok'. This updates your STUDY.
> 4. You should be able to find STUDY.cluster(1,x).icaerspwhich is a cell that contains group x condition data (each of them have the size of frequency x timepoint).
> 5. You select pick them up to calculate subtraction. You can also find frequency and time scales there.
> 6. FYI to plot time-frequency plot use 'imagesc(); axis xy'.
> 
> Sorry I can't provide exactly matched information. If you find this method does not help much let me know.
> %%%%%%%%%%%%%%%%%
> 
> Maybe I should write a little plug-in for this. Sorry for this apparent inconvenience.
> 
> Makoto 
> 
> 2013/2/25 Pete Manza <pete.manza at gmail.com>
> Hello all,
> 
> I know there have been several posts on this but I haven't been able to make sense of how to proceed with my own code, as I'm not an experienced MATLAB user.  
> 
> I was wondering if anyone would be willing to share some code for plotting the ERSP subtraction of conditions (i.e., Condition A - Condition B): at the single channel level and if possible, for scalp maps of the difference also.  (And, if it's necessary, code for precomputing the difference -- do you have to precompute the difference first in order to plot it?  There was some disagreement in one of the older threads I had seen.) 
> 
> I'm working within a STUDY design.  I'm not using ICA-based clusters, just channels.
> 
> Thanks very much for the help!
> Pete Manza
> Stony Brook University
> 
> _______________________________________________
> 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
> 
> 
> 
> -- 
> Makoto Miyakoshi
> JSPS Postdoctral Fellow for Research Abroad
> Swartz Center for Computational Neuroscience
> Institute for Neural Computation, University of California San Diego
> _______________________________________________
> 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/20130225/ac3fa94f/attachment.html>


More information about the eeglablist mailing list