<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:14pt"><div style="" class="" id="yiv2914333094"><div style="" class=""><div class="" style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:14pt;"><div style="" class="" id="yiv2914333094yui_3_16_0_5_1410419101382_4"><span style="" class="" id="yiv2914333094yui_3_16_0_5_1410419101382_30">Dear Dorothy.<br style=""><br style="" class="">Just some comments.<br style="" class="">*  </span><span style="" class="" id="yiv2914333094yui_3_16_0_5_1410419101382_30">newtimef script calculates the mean of log spectral across the epochs. <br style="" class="">* spectopo uses pwelch for psd's calculation for a single input time series.<br style="" class="">* pop_eegfilt makes a filtering in time domain. NOT frequency domain (as
 above). <br style="" class=""> <br style="" class=""></span></div><div class="" id="yiv2914333094yui_3_16_0_1_1410419101382_38683" style="color:rgb(0, 0, 0);font-size:18.6667px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;"><span style="" class="" id="yiv2914333094yui_3_16_0_5_1410419101382_30">I have tested with my EEG data and I obtained similar results between spectopo and typical PSD analysis. For example,<br style="" class=""><br style="" class="">mydata=EEG.data(7,:,:); % EEG channel<br style="" class="">[spectra,freqs] = spectopo(mydata, 0,200,'plot','off'); % this script uses Welch estimation<br style="" class="">myspec=pwelch(mydata,512,0,1024,200); % psd computation by Welch. <br style="" class="">% (data, windowlength,overlap,ffftsize,fsampling)<br style="" class="">figure,plot(spectra)<br style="" class="">figure,semilogy(myspec)<br style=""
 class=""> <br style="" class="">I think that differences are oriented to how the methods calculate the psd. About newtimef.m, I have more doubts about it, but I suposse it could be the same.  <br style="" class=""><br style="" class="">Best<br style="" class=""></span><br style="" class="" clear="none">Carlos Guerrero-Mosquera<br class="" style="" clear="none"><span class="" style="">Research Centre of Cognition and Neurosciences </span><span class="" style="">(CRNC)</span><span class="" style=""><em class="" style=""></em><em class="" style=""></em><em class="" style=""></em>-UR2NF<br class="" style="" clear="none">Bruxelles</span></div> <div class="" id="yiv2914333094yui_3_16_0_5_1410419101382_7" style="display: none;"> <div class="" style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:14pt;"> <div class="" style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande,
 sans-serif;font-size:12pt;"> <div style="" class="" id="yiv2914333094yqt62103"><div style="" class="" dir="ltr"> <font style="" class="" face="Arial" size="2"> On Wednesday, September 10, 2014 6:01 PM, Dorothy Bishop <dorothy.bishop@psy.ox.ac.uk> wrote:<br style="" class="" clear="none"> </font> </div>  <br style="" class="" clear="none"><br style="" class="" clear="none"> <div style="" class=""><div style="" class="" id="yiv2914333094">

 
<style style="" class="" type="text/css"></style>

<div style="" class="">
<div class="" style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt;">
<div style="" class=""><font style="" class="" size="3">Dear All</font></div>
<div style="" class=""><font style="" class="" size="3"> </font></div>
<div style="" class=""><font style="" class="" size="3">I am trying to compute power in the mu frequency range, 8-13 Hz.</font></div>
<div style="" class=""><font style="" class="" size="3">I've tried 3 different methods for doing this which I thought would be broadly equivalent: However, for the same data, I get very different results depending on the method I use.</font></div>
<div style="" class=""><font style="" class="" size="3">If results were just a linear transform of one another, I would not be bothered, but it’s more serious than that.</font></div>
<div style="" class=""><font style="" class="" size="3">I am comparing power for 5 different conditions, and when I plot the power for each condition, the pattern of results across conditions is completely different depending on what I do.</font></div>
<div style="" class=""><font style="" class="" size="3">I've provided my pared-down scripts below. I'd be grateful if someone could let me know if I’m doing something wrong, or if I've just misunderstood how these functions work. </font></div>
<div style="" class=""><font style="" class="" size="3">I’d be happy to provide fuller examples if need be.</font></div>
<div style="" class=""><font style="" class="" size="3"> I'm running eeglab6.1 with matlabR2009b. Many thanks</font></div>
<div style="" class=""><font style="" class="" size="3"> </font></div>
<div style="" class=""><font style="" class="" size="3">With the identical data, I have tried:</font></div>
<div style="" class="">%1.       Using FFT via newtimef,</div>
<div style="" class="">%mydata is subset of EEG.data for trials for given condition and electrode, squeezed to 2D</div>
<div style="" class="">mydata=squeeze(EEG.data(18,:,:));%electrode 18 is C3</div>
<div style="" class="">cycles=0;</div>
<div style="" class="">[ersp,itc,powbase,times,freqs]=...</div>
<div style="" class="">    newtimef( mydata,EEG.pnts,[EEG.xmin EEG.xmax]*EEG.srate, EEG.srate, cycles, 'baseline',NaN,'plotitc','off','plotersp','off');</div>
<div style="" class="">murange = find(freqs>8 & freqs<13);</div>
<div style="" class="">mypowermean=(mean(ersp(murange,:),2));</div>
<div style="" class="">allmu=mean(mypowermean)</div>
<div style="" class=""><br style="" class="" clear="none">
</div>
<div style="" class=""> </div>
<div style="" class="">%2.       Using spectopo,</div>
<div style="" class="">% thisdata is subset of trials from EEG data for 1 electrodes and a given condition</div>
<div style="" class="">thisdata=EEG.data(18,:,:);</div>
<div style="" class="">[spectra,freqs] = spectopo(thisdata, 0, EEG.srate,'plot','off');</div>
<div style="" class="">murange2 = find(freqs>8 & freqs<13);</div>
<div style="" class="">allmu2 = mean(spectra(murange2),2)</div>
<div style="" class=""> </div>
<div style="" class="">%3. Computing power from EEG.data after bandpass filtering at 8-13 Hz</div>
<div style="" class="">% mydata is EEG.data for given electrode and condition, squeezed to 2D</div>
<div style="" class="">f1=8;f2=13;</div>
<div style="" class="">EEG= pop_eegfilt(EEG,0,f2, [], [0]); % Low pass filter with cutoff freq f2 Hz</div>
<div style="" class="">EEG = eeg_checkset(EEG );</div>
<div style="" class="">EEG= pop_eegfilt(EEG,f1,0, [], [0]); % High pass filter with cutoff freq f1 Hz</div>
<div style="" class="">EEG = eeg_checkset(EEG );</div>
<div style="" class="">mydata=squeeze(EEG.data(18,:,:));%electrode 18 is C3</div>
<div style="" class="">mydamean=mean(mydata,2);</div>
<div style="" class="">mydavoltsq=mydamean.^2;</div>
<div style="" class="">myvoltsq=mean(mydavoltsq);</div>
<div style="" class="">allmu3=10*log10(myvoltsq/10);</div>
<div style="" class=""><br style="" class="" clear="none">
</div>
<div style="" class="">  </div>
<div style="" class=""> </div>
<div style="" class=""><br style="" class="" clear="none">
<div class="" style="font-family:Tahoma;font-size:13px;">
<div class="" style="font-family:Tahoma;font-size:13px;">
<div class="" style="font-family:Tahoma;font-size:13px;">
<div style="" class=""><font style="" class="" size="2">
</font><div style="" class="">Dorothy Bishop, Professor of Developmental Neuropsychology,<br style="" class="" clear="none">
Dept of Experimental Psychology, University of Oxford, OX1 3UD.<br style="" class="" clear="none">
tel +44 (0)1865 271369; fax +44 (0)1865 281255;<br style="" class="" clear="none">
WEB: <a rel="nofollow" shape="rect" class="" target="_blank" href="http://www.psy.ox.ac.uk/oscci" style="font-family:Calibri, sans-serif;font-size:15px;"><font style="" class="" color="#0070C0">www.psy.ox.ac.uk/oscci</font></a><br style="" class="" clear="none">
Blog: <a style="" class="" rel="nofollow" shape="rect" target="_blank" href="http://deevybee.blogspot.com/">http://deevybee.blogspot.com/</a></div>
<div style="" class="">Raising Awareness of Language Learning Impairments! See <a style="" class="" rel="nofollow" shape="rect" target="_blank" href="http://www.youtube.com/RALLIcampaign">
www.youtube.com/RALLIcampaign</a></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div><br style="" class="" clear="none">_______________________________________________<br style="" class="" clear="none">Eeglablist page: <a style="" class="" rel="nofollow" shape="rect" target="_blank" href="http://sccn.ucsd.edu/eeglab/eeglabmail.html">http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br style="" class="" clear="none">To unsubscribe, send an empty email to <a style="" class="" rel="nofollow" shape="rect" ymailto="mailto:eeglablist-unsubscribe@sccn.ucsd.edu" target="_blank" href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu">eeglablist-unsubscribe@sccn.ucsd.edu</a><br style="" class="" clear="none">For digest mode, send an email with the subject "set digest mime" to <a style="" class="" rel="nofollow" shape="rect" ymailto="mailto:eeglablist-request@sccn.ucsd.edu" target="_blank" href="mailto:eeglablist-request@sccn.ucsd.edu">eeglablist-request@sccn.ucsd.edu</a><br style="" class="" clear="none"><br style="" class=""
 clear="none"></div></div>  </div> </div>  </div> </div></div></div></div></body></html>