[FieldTrip] spectral resolution & interpretation of power estimates

Jörn M. Horschig jorn at artinis.com
Wed Nov 26 08:43:47 CET 2014


Hey,

as an addition, maybe keep in mind that using filters you in fact widen your
main lobe (i.e. decrease the effective frequency resolution, e.g. for a
Hanning taper the main lobe drops to zero at twice the Raleigh frequency),
and you do this to decrease magnitude of the side lobes. Most people tend to
forget such things when interpreting their data (incl. me).

Best,
Jörn

--

Jörn M. Horschig, Software Engineer
Artinis Medical Systems  |  +31 481 350 980 

> -----Original Message-----
> From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-
> bounces at science.ru.nl] On Behalf Of Lam, N.H.L. (Nietzsche)
> Sent: Tuesday, November 25, 2014 3:34 PM
> To: FieldTrip discussion list
> Subject: Re: [FieldTrip] spectral resolution & interpretation of power
> estimates
> 
> Hi Helene,
> 
> The idea in general is to design one's experiment in a way that allows one
to
> observe effects at the frequency of interest.  Otherwise, what you might
> end up with is an experiment that doesn't allow you to estimate power at
> the frequencies of interest.
> 
> For wavelets, given your specifications, you would get a spectral
bandwidth
> of  8/7*2 = 2.28 Hz.
> So  8 +/-  2.28 Hz  ( 5.72 - 10.28) i.e. the bandwidth calculated refers
to the
> bandwidth on one end, not both. Therefore, you shouldn't divide by two.
> Similarly with multitapers, if you have a smoothing for 8 Hz, that's -8Hz
and
> +8Hz.
> 
> For the Hanning taper,  1/0.5s  = 2Hz, means you get estimates of power
that
> are multiples of 2 Hz, so 10, 12, 14 Hz ..etc.   With regards to what the
spectral
> bandwidth is, the short answer is that it is  plus and minus half the
frequency
> resolution.  So, for 10 Hz, it is 9 - 11Hz.   The reasons behind this
answer are to
> do with the spectral profile of the taper (e.g., a Hanning window) that
you
> apply to your data.  I would suggest that you take a look at one of our
lecture
> video's here by Robert:
> https://www.youtube.com/watch?feature=player_detailpage&v=QLvsa1r1V
> oc#t=741   where he provides a much more detailed explanation.
> 
> cfg.pad parameter in ft_freqanalysis:  This parameter is helpful if your
trials
> are of different length.  If you set cfg.pad = 7, that means any trial
shorter
> than 7s long will be padded to become 7s worth of data.  The type of data
> that you use to pad is specified in cfg.padtype.    The frequency
resolution of
> your data is indeed 1/cfg.pad.    There is a suggested limit for how much
you
> should pad given your data, but I'm not sure what the limit is, maybe
> someone else knows.
> 
> Now with your code,
>   cfg.toi = -1.75:0.05:1.75;
>   cfg.taper = 'hanning';
>   cfg.foi = 3:35;
>   cfg.t_ftimwin = ones(length(cfg.foi),1) .* 0.4;
> 
> You have a 0.4 second window.  So 1/0.4 = 2.5Hz frequency resolution, as
you
> figured out.
> This means you can only estimate in steps of 2.5Hz so doing power
estimates
> at 1 Hz steps does *not* make sense.  To get any sensible estimate, you
> would need something like this cfg.foi = 2.5:2.5:35;
> 
> Finally, no, the frequency resolution does not have to be an integer. We
> don't know what frequency(ies) the brain oscillates, but integers allow
for us
> to deal with the data more easily.
> 
> I hope this helps, and I hope that if I've not been entirely accurate with
my
> explanations that someone will jump in to correct me.
> 
> Best,
> Nietzsche
> 
> ________________________________________
> From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on
> behalf of Helene Gudi [helene.gudi at uni-hamburg.de]
> Sent: 25 November 2014 13:15
> To: fieldtrip at science.ru.nl
> Subject: [FieldTrip] spectral resolution & interpretation of power
estimates
> 
> Dear FieldTrip List,
> 
> Since  a while I am struggeling with a question regarding the spectral
> resolution and its consequences for interpreting the power vaules. I would
> appreciate any comments or hints which help me understand the issue.
> 
> As described in the tutorial on TFR analysis when using the Morlet
wavelets
> the spectral bandwidth at a given frequency is determined by the formula:
> F/width*2, meaning that when I define cfg.width=7 and look into the
> estimated power values of e.g. 8Hz, what I get is the power values not for
8
> Hz but for a spectral band of 8Hz+/- (8/7*2)/2.
> Am I correct?
> If yes, is this also true when estimating the power values using a Hanning
> window? As described in the tutorial when using the Hanning taper the
> frequency resolution is defined by: 1/length of the sliding window. Let's
say
> my sliding window = .5s, resulting in a frequency resolution of 2 Hz. Now,
if i
> look into the power estimate for 10 Hz, do I get the spectral band of 2Hz
at a
> given frequency eg. 9-11Hz, for 10Hz etc.?
> 
> My next question refers to the 'cfg.pad' parameter, in the help it says:
> "the padding determines the spectral resolution". I unfortunately could
not
> find any further explanations. What exactly does it mean? How do I compute
> the exact frequency resolution once cfg.pad has been used? Is it
1/cfg.pad?
> Does the padding allow to estimate power values for frequencies other than
> given by '1/length of time window'-resolution? As in the code below power
> estimates are calculated in 1Hz steps. Do the power estimates at 3Hz,4Hz
etc.
> make sense at all, given the frequency resolution of 2.5Hz (as defined by
> 1/cfg.t_ftimwin)? What spectral band is actually included in the single
1Hz
> bins? Is it a problem if the frequency resolution ist not an integer?
> 
>                  cfg = [];
>                  cfg.output = 'pow';
>                  cfg.channel = 'all';
>                  cfg.keeptapers  = 'no';
>                  cfg.pad = 7;
>                  cfg.method = 'mtmconvol';
>                  cfg.toi = -1.75:0.05:1.75;
>                  cfg.taper = 'hanning';
>                  cfg.keeptrials  = 'yes';
>                  cfg.foi = 3:35;
>                  cfg.t_ftimwin = ones(length(cfg.foi),1) .* 0.4;
>                  ft_freqanalysis(cfg, data);
> 
> I would be very thankful for any help!
> Lena
> 
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> 
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip





More information about the fieldtrip mailing list