[FieldTrip] About calculation of total power in TFr analysis

Pelt, S. van (Stan) stan.vanpelt at donders.ru.nl
Tue May 10 14:36:04 CEST 2016


Dear Tuna,

In your code power is calculated relative to a baseline. So what you end up with is power change, not absolute power per se. Please check for yourself whether you want to have the data baselined or not.
Secondly, assuming that you want to compute total power in the entire 1s epoch, a time-resolved FFT as you have now is not necessary. I would suggest using a regular FFT on the entire epoch (see my previous reply), without any baselining.
Finally, the power now is only computed within the 1-40Hz range, which is less than ‘total’ of course.

I would also advice you to go through some of the FT-tutorials on Fourier analyses, and search through the (extensive) mailing list-archive, see e.g. this thread: http://mailman.science.ru.nl/pipermail/fieldtrip/2013-January/006114.html

Best,
Stan

PS. Replying to the mailinglist is more useful than to specific persons individually, since the discussion might help others, too, and other people might want to add to the discussion.

From: Tuna Cakar [mailto:cogsci.tuna at gmail.com]
Sent: dinsdag 10 mei 2016 13:44
To: Pelt, S. van (Stan)
Subject: Re: [FieldTrip] About calculation of total power in TFr analysis


Dear Dr. van Pelt,

I would like to thank you a lot for your response that also includes the necessary codes.
The code I have performed is as below:

cfg = [];

cfg.baseline     = [-0.4 -0.2];

cfg.baselinetype = 'relative'; %'absolute';

cfg.channel    = 'all';

cfg.method     = 'wavelet';

cfg.width      = 2;

cfg.output     = 'pow';

cfg.foi        = 1:1:40;

cfg.toi        = -0.4:0.01:0.99;

cfg.keeptrials = 'yes';

TFR_MW_Px = ft_freqanalysis(cfg, data_out);

Does it also calculate the total power then? I am supposed to perform wavelet analysis via Morlet and then calculate the total power. I may also look for trial-based analyses.

It is also of my further interest to do the induced and evoked power calculations in the next steps. I would really appreciate your further support.

Best,

Tuna

2016-05-10 14:26 GMT+03:00 Tuna Cakar <cogsci.tuna at gmail.com<mailto:cogsci.tuna at gmail.com>>:

Dear Dr. van Pelt,
I would like to thank you a lot for your response that also includes the necessary codes.
The code I have performed is as below:
cfg = [];cfg.baseline     = [-0.4 -0.2]; cfg.baselinetype = 'relative'; %'absolute';cfg.channel    = 'all';                cfg.method     = 'wavelet';                cfg.width      = 2; cfg.output     = 'pow'; cfg.foi        = 1:1:40;                cfg.toi        = -0.4:0.01:0.99;cfg.keeptrials = 'yes';TFR_MW_Px = ft_freqanalysis(cfg, data_out);
Does it also calculate the total power then? I am supposed to perform wavelet analysis via Morlet and then calculate the total power. I may also look for trial-based analyses.
It is also of my further interest to do the induced and evoked power calculations in the next steps. I would really appreciate your further support.

Best,

Tuna
Dear Tuna,

As far as I understand, the morlet-TFR example as used in the tutorial (http://www.fieldtriptoolbox.org/tutorial/timefrequencyanalysis) computes total (evoked and induced) power, per trial and time bin, and then averages over trials.

To compute total power in the 1000ms epoch, I would suggest using cfg.method=’mtmfft’. E.g., something like the following, assuming that your data is organized in trials in a variable called ‘data’. BTW, note that because of your 1000ms data epoch, the intrinsic frequency resolution of your data is 1 Hz (1/1), thus spectral power below 1 Hz will be poorly estimated.

cfg=[];
cfg.toilim=[0.0 1.0]; %1000ms time window
data_ep=ft_redefinetrial(cfg,data);

cfg=[];
cfg.pad=10;
cfg.method=’mtmfft’;
cfg.outpu=’pow’;
cfg.foilim= [0.1 40];
cfg.channel = ‘all’;
data_ep_pow=ft_freqanalysis(cfg,data_ep);

Hope that helps.

Best, Stan

--
Stan van Pelt, PhD
Donders Institute for Brain, Cognition and Behaviour
Radboud University
Montessorilaan 3, B.01.34
6525 HR Nijmegen, the Netherlands
tel: +31 24 3616288<tel:%2B31%2024%203616288>



From: fieldtrip-bounces at science.ru.nl<mailto:fieldtrip-bounces at science.ru.nl> [mailto:fieldtrip-bounces at science.ru.nl<mailto:fieldtrip-bounces at science.ru.nl>] On Behalf Of Tuna Cakar
Sent: maandag 9 mei 2016 17:26
To: fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>
Subject: [FieldTrip] About calculation of total power in TFr analysis

Dear all,

Although I have been using Fieldtrip over a year for the ERP analyses mostly, I am new in this e-mail list. I want to ask a simple question that has been challenging for me.

Regarding the time-frequency analysis (Morlet), I would like to calculate the total power over 1000 milliseconds and 0.1-40 Hz range. I realised that the codes in tutorial provides the calculation of evoked power.

Could someone please help me with that?

Thanks very much in advance. Kind regards, best,

Tuna



_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl<mailto:fieldtrip at donders.ru.nl>
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160510/1f08f61a/attachment.html>


More information about the fieldtrip mailing list