[Eeglablist] Power in spectopo vs. fft
Trilla Gros, Irene (Stud. FPN)
i.trilla at student.maastrichtuniversity.nl
Thu May 8 06:31:42 PDT 2014
I am trying to calculate an index of mu suppression by doing the log ratio between alpha-band power in one condition (e.g. S5) and alpha-band power in baseline (e.g. B5): log(powerS5/powerS6).
To do that, I first extracted the mean absolute power of the alpha range (8-12 Hz) for condition (S5) and for baseline (B5) using spectopo in EEGLAB:
[spectra,freqs] = spectopo(EEG.data(2,:,:), 0, EEG.srate); % For channel 2 (C4)
AlphaIdx = find(freqs>=8 & freqs<=12); % alpha=8-12
AlphaPower = 10^(mean(spectra(AlphaIdx))/10); % mean power
Additionally, I did the same analysis but using directly the FFT function in MATLAB instead:
x = EEG.data(2, :, :); % For channel 2 (C4)
Fs = EEG.srate; % Sampling frequency
L = EEG.pnts; % Length of signal
NFFT = 2^nextpow2(L); % Next power of 2 from length of x
X = fft(x,NFFT)/L;
f = Fs/2*linspace(0,1,NFFT/2+1);
power = abs(X(1:NFFT/2+1));
AlphaIdx = find(f>=8 & f<=12);
AlphaPower = mean(power(AlphaIdx));
When I compute the ratio (power condition/power baseline) the results are very different depending on whether I use the absolute power calculated with spectopo or whether I use the power from the fft function. Even if the magnitudes computed with spectopo and fft differ, shouldn’t the ratio between the condition and baseline be the same? Aren't these two functions comparable when extracting frequency power?
Thanks in advance for your answers!
More information about the eeglablist