[Eeglablist] Why do different methods for measuring power give such different results?

Makoto Miyakoshi mmiyakoshi at ucsd.edu
Mon Sep 15 18:47:48 PDT 2014


Dear Dorothy,

First of all, use pop_eegfiltnew(). Strongly recommended.

If you want to match wavelet transform results to FFT results in the freq
domain, you have to have loooooong cycles. I have ran the experiment
several years ago, and if I had cycle == 20 or around the freq domain plot
of the newtimef results (i.e. averaging across time points) matched the
curve of FFT in 8-13 Hz. The default cycle is 3, not 20, so the results
should be quite different. This is due to time-frequency trade off in the
wavelet transform.

Makoto

On Thu, Sep 11, 2014 at 3:00 AM, Carlos Andrés Guerrero M. <
cguerrero76 at yahoo.com> wrote:

> Dear Dorothy.
>
> Just some comments.
> *  newtimef script calculates the mean of log spectral across the epochs.
> * spectopo uses pwelch for psd's calculation for a single input time
> series.
> * pop_eegfilt makes a filtering in time domain. NOT frequency domain (as
> above).
>
> I have tested with my EEG data and I obtained similar results between
> spectopo and typical PSD analysis. For example,
>
> mydata=EEG.data(7,:,:); % EEG channel
> [spectra,freqs] = spectopo(mydata, 0,200,'plot','off'); % this script uses
> Welch estimation
> myspec=pwelch(mydata,512,0,1024,200); % psd computation by Welch.
> % (data, windowlength,overlap,ffftsize,fsampling)
> figure,plot(spectra)
> figure,semilogy(myspec)
>
> 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.
>
> Best
>
> Carlos Guerrero-Mosquera
> Research Centre of Cognition and Neurosciences (CRNC)-UR2NF
> Bruxelles
>    On Wednesday, September 10, 2014 6:01 PM, Dorothy Bishop <
> dorothy.bishop at psy.ox.ac.uk> wrote:
>
>
>   Dear All
>
> I am trying to compute power in the mu frequency range, 8-13 Hz.
> 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.
> If results were just a linear transform of one another, I would not be
> bothered, but it’s more serious than that.
> 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.
> 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.
> I’d be happy to provide fuller examples if need be.
>  I'm running eeglab6.1 with matlabR2009b. Many thanks
>
> With the identical data, I have tried:
> %1.       Using FFT via newtimef,
> %mydata is subset of EEG.data for trials for given condition and
> electrode, squeezed to 2D
> mydata=squeeze(EEG.data(18,:,:));%electrode 18 is C3
> cycles=0;
> [ersp,itc,powbase,times,freqs]=...
>     newtimef( mydata,EEG.pnts,[EEG.xmin EEG.xmax]*EEG.srate, EEG.srate,
> cycles, 'baseline',NaN,'plotitc','off','plotersp','off');
> murange = find(freqs>8 & freqs<13);
> mypowermean=(mean(ersp(murange,:),2));
> allmu=mean(mypowermean)
>
>
> %2.       Using spectopo,
> % thisdata is subset of trials from EEG data for 1 electrodes and a given
> condition
> thisdata=EEG.data(18,:,:);
> [spectra,freqs] = spectopo(thisdata, 0, EEG.srate,'plot','off');
> murange2 = find(freqs>8 & freqs<13);
> allmu2 = mean(spectra(murange2),2)
>
> %3. Computing power from EEG.data after bandpass filtering at 8-13 Hz
> % mydata is EEG.data for given electrode and condition, squeezed to 2D
> f1=8;f2=13;
> EEG= pop_eegfilt(EEG,0,f2, [], [0]); % Low pass filter with cutoff freq f2
> Hz
> EEG = eeg_checkset(EEG );
> EEG= pop_eegfilt(EEG,f1,0, [], [0]); % High pass filter with cutoff freq
> f1 Hz
> EEG = eeg_checkset(EEG );
> mydata=squeeze(EEG.data(18,:,:));%electrode 18 is C3
> mydamean=mean(mydata,2);
> mydavoltsq=mydamean.^2;
> myvoltsq=mean(mydavoltsq);
> allmu3=10*log10(myvoltsq/10);
>
>
>
>
>   Dorothy Bishop, Professor of Developmental Neuropsychology,
> Dept of Experimental Psychology, University of Oxford, OX1 3UD.
> tel +44 (0)1865 271369; fax +44 (0)1865 281255;
> WEB: www.psy.ox.ac.uk/oscci
> Blog: http://deevybee.blogspot.com/
> Raising Awareness of Language Learning Impairments! See
> www.youtube.com/RALLIcampaign
>
> _______________________________________________
> 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
>
>
> _______________________________________________
> 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
Swartz Center for Computational Neuroscience
Institute for Neural Computation, University of California San Diego
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20140915/f7942d2f/attachment.html>


More information about the eeglablist mailing list