[Eeglablist] 答复: bandwidth powers calculation over time
Makoto Miyakoshi
mmiyakoshi at ucsd.edu
Wed Apr 20 18:44:36 PDT 2016
Dear Chong,
I can't give you a complete check on your code but here is my code to
compute frequency-binned powers. Consider using this solution for each
block in your case.
Makoto
%%%%%%%%%%%%%%%%%%%
% for your epoched data, channel 2
[spectra,freqs] = spectopo(EEG.data(2,:,:), 0, EEG.srate);
% delta=1-4, theta=4-8, alpha=8-13, beta=13-30, gamma=30-80
deltaIdx = find(freqs>1 & freqs<4);
thetaIdx = find(freqs>4 & freqs<8);
alphaIdx = find(freqs>8 & freqs<13);
betaIdx = find(freqs>13 & freqs<30);
gammaIdx = find(freqs>30 & freqs<80);
% compute absolute power
deltaPower = mean(10.^(spectra(deltaIdx)/10));
thetaPower = mean(10.^(spectra(thetaIdx)/10));
alphaPower = mean(10.^(spectra(alphaIdx)/10));
betaPower = mean(10.^(spectra(betaIdx)/10));
gammaPower = mean(10.^(spectra(gammaIdx)/10));
%%%%%%%%%%%%%%%%%
On Mon, Apr 4, 2016 at 11:45 PM, Chong Li <C.Li-1 at tudelft.nl> wrote:
> Dear Makoto,
>
>
>
> Thank you for your reply.
>
>
>
> I checked NBT, and I think NBT will be very useful for ongoing neuronal
> activity. Now, EEGLAB should be enough to fit my needs for offline
> analysis.
>
>
>
> I am using the following codes to compute (alpha power/theta power) over
> the first 20s period, and then update every 2s using a 20s moving window.
> Could you please help me to check if it is correct?
>
>
>
> for i= 1:6 %channel 1-6
>
> for j = 1:50 %I have 2 mins data, 20s moving window stops at 100s
>
> [power, freq] = spectopo(EEG.data(i,
> (2*(j-1)*128+1):(20*128+2*(j-1)*128)), 0, 128); %compute the power spectra
> using a 20s moving window
>
> pow=10.^power; %transfer db to avoid negative number
>
> alpha(i,j) = sum(pow(8:12))/sum(pow(1:50)); % alpha percent
> power of the total power
>
> theta(i,j) = sum(pow(4:7))/sum(pow(1:50));
>
> cog(i,j) = (alpha(i,j)/theta(i,j));% the ratio I need
>
> end
>
> end
>
>
>
> Thank you for your help in advance.
>
>
>
> Best regards,
>
> Chong
>
> *发件人:* Makoto Miyakoshi [mailto:mmiyakoshi at ucsd.edu]
> *发送时间:* 2016年4月5日 13:30
> *收件人:* Chong Li
> *抄送:* EEGLAB List
> *主题:* Re: [Eeglablist] bandwidth powers calculation over time
>
>
>
> Dear Chong,
>
>
>
> You may want to try Simon-Shlomo Poil's NBT. Should fit your needs, I
> believe.
>
> https://www.nbtwiki.net/
>
>
>
> Makoto
>
>
>
> On Tue, Mar 29, 2016 at 7:25 PM, Chong Li <C.Li-1 at tudelft.nl> wrote:
>
> Hi everyone,
>
>
>
> I have problems in calculating (alpha power/theta power) over time. I have
> studied the tutorial, currently I am able to reject the artifacts using
> visual inspection and ICA. I can also calculate (alpha power/theta power)
> over channels using EEGLAB GUI. But I still have problems computing this
> correlation over time. Since I don't have experience in EEG analysis, any
> help would be appreciated.
>
>
>
> I collected the data using EMOTIV EPOC headset. In my analysis, I would
> like to see the correlation between alpha and theta. To normalize the
> power, these bandwidth powers will be divided by total power. Then I want
> to calculate (alpha power/theta power) over the first 20s period, and then
> update every 2s using a 20s moving window.
>
>
>
> Thanks for the help in advance.
>
>
>
> --
>
> *Chong Li *PhD student
> Department of Design Engineering
> Faculty of Industrial Design Engineering
> Delft University of Technology
> Landbergstraat 15, 2628 CE Delft, The Netherlands
>
>
>
>
> _______________________________________________
> 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
>
--
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/20160420/8c4264c0/attachment.html>
More information about the eeglablist
mailing list