<div dir="ltr">Hi All,<br><br>I am trying to locate a source using beamforming to a short lasting (during 100ms) oscillatory (frequency=28Hz) effect that I find at the sensor level. The thing is that because of the short time window, the frequency smoothing is bound to be high, whereas I would like to limit it as much as possible; not to mention that because trial length varies across subjects and trials, 100ms is the maximal window, but in truth segments are shorter. <br>
Any idea of how I could beamform on such short time window? <br><br>Thanks in advance for any ideas,<br><br>Yoni<br><br><br><br><div class="gmail_quote">On Fri, Oct 5, 2012 at 12:00 PM, <span dir="ltr"><<a href="mailto:fieldtrip-request@science.ru.nl" target="_blank">fieldtrip-request@science.ru.nl</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send fieldtrip mailing list submissions to<br>
<a href="mailto:fieldtrip@science.ru.nl">fieldtrip@science.ru.nl</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:fieldtrip-request@science.ru.nl">fieldtrip-request@science.ru.nl</a><br>
<br>
You can reach the person managing the list at<br>
<a href="mailto:fieldtrip-owner@science.ru.nl">fieldtrip-owner@science.ru.nl</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of fieldtrip digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. Re: Frequency smoothing for beamforming (J?rn M. Horschig)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Fri, 05 Oct 2012 08:56:27 +0200<br>
From: "J?rn M. Horschig" <<a href="mailto:jm.horschig@donders.ru.nl">jm.horschig@donders.ru.nl</a>><br>
To: FieldTrip discussion list <<a href="mailto:fieldtrip@science.ru.nl">fieldtrip@science.ru.nl</a>><br>
Subject: Re: [FieldTrip] Frequency smoothing for beamforming<br>
Message-ID: <<a href="mailto:506E849B.7050602@donders.ru.nl">506E849B.7050602@donders.ru.nl</a>><br>
Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"<br>
<br>
Hey Yoni,<br>
<br>
Stephen is right, and just to make this really clear, a Hanning taper<br>
will always give you a smoothing of your Raleigh frequency (which in<br>
your case is 3.33Hz). Any taper can only (effectively) smooth in terms<br>
of your frequency resolution or Raleigh frequency, thus a Hann taper<br>
gives you the minimal smoothing (apart from a boxcar). Then, the problem<br>
with different trial becomes more apparent, because since the frequency<br>
resolution changes, also the smoothing of the Hanning taper changes<br>
accordingly. I also think that making the trials having equal length is<br>
the best approach. Having unequal trial lengths also constitutes a<br>
problem for multitapering, cause you will end up with different tapers<br>
and different number of tapers per trial. And also your frequency<br>
smoothing should be a multiple of the Raleigh frequency. You can ask for<br>
other smoothing, e.g. 8Hz with 3.33Hz resolution, but effectively you<br>
will see the smoothing at 6.66 or 9.99Hz (depending on where you define<br>
the end of smoothing) - it's just because you sample in 3.33Hz steps.<br>
Here you can maybe also see, that having different trial lengths might<br>
constitute a problem, because you will effectively get different<br>
smoothing per trial, depending on your Raleigh frequency. The<br>
computation of the tapers was however correct, so with 8Hz smoothing and<br>
a 0.3s time window you get 3 tapers ;) Btw, I once played around with it<br>
and realized that the 3 tapers you obtain are not always the same for<br>
different parameters, e.g. for 8Hz and 0.25s window you will also get<br>
8*0.25*2-1 = 3 tapers, but they will be different from the 3 tapers you<br>
get with a 0.3s time window. So even that can cause a problem.<br>
<br>
Btw, I never heard that different frequency smoothing ends up in<br>
different part of the brain when beaming. The only reason I can see is<br>
what Stephen already pointed out, that other frequency bands with<br>
different functional characteristics smear into your power spectrum.<br>
<br>
Best,<br>
J?rn<br>
<br>
<br>
<br>
<br>
On 10/4/2012 3:47 PM, Stephen Whitmarsh wrote:<br>
> Hi Yoni,<br>
><br>
> Indeed, a simple hanning taper will already give you a frequency<br>
> smoothing of +/- 3Hz. Adding tapers can only increase this, and I<br>
> don't see why you would beamform 22 to 38 Hz if you are interested<br>
> between in 29-31 Hz. Couldn't you just do cfg.foi = 30, with cfg.taper<br>
> = 'hanning', giving you a measure of power between of about 27 and 33?<br>
><br>
> You're right that having different trial lenghts will indeed give you<br>
> a different frequency resolution per trial. If this is a problem is<br>
> hard to say from here. cfg.minlength = 'maxperlen in ft_redefinetrial<br>
> would indeed make sure they are all of the same length (i.e. the<br>
> maximal length) - but if that is different between subjects/conditions<br>
> that might not be enough.<br>
><br>
> Best,<br>
> Stephen<br>
><br>
><br>
><br>
> On 4 October 2012 11:56, Yoni Levy <<a href="mailto:yoniilevy@gmail.com">yoniilevy@gmail.com</a><br>
> <mailto:<a href="mailto:yoniilevy@gmail.com">yoniilevy@gmail.com</a>>> wrote:<br>
><br>
> Hi Stephen!<br>
> Thanks for your reply.<br>
><br>
> My FOI is 29-31Hz; Since my time window is of 300ms, then my freq<br>
> smoothing should now be of +/-3.33Hz. If I use a hanning taper,<br>
> the parameters that i use for the freqanal (for further on doing<br>
> beamformer-statistics) are:<br>
> cfg.method ='mtmfft';<br>
> cfg.output ='fourier';<br>
> cfg.keeptrials = 'yes';<br>
> cfg.keeptapers = 'yes';<br>
> cfg.taper = 'hanning';<br>
> cfg.foilim = [29 31];<br>
> However, if I get it right, multitapering should also be an option<br>
> as 30Hz is not a relatively very low frequency. In that case, i<br>
> remove the hanning and instead include a cfg.tapsmofrq =8, so that<br>
> the number of tapers results in 8*0.3*2-1= 3 (I think?). Is it so?<br>
><br>
> Also, about the time window which is theoretically 300ms, but i<br>
> think this depends on the length of every trial; for instance,<br>
> before freqanal, when i redefine the trial, i input cfg.minlength<br>
> = 'maxperlen'. So if i alter that, the freq smoothing should be<br>
> different as well, correct? Ye, anyway, I wonder how to optimize<br>
> all those parameters for my source localization statistics.<br>
><br>
> Thanks in advance,<br>
><br>
> Yoni<br>
><br>
><br>
> On Wed, Oct 3, 2012 at 3:55 PM, <<a href="mailto:fieldtrip-request@science.ru.nl">fieldtrip-request@science.ru.nl</a><br>
> <mailto:<a href="mailto:fieldtrip-request@science.ru.nl">fieldtrip-request@science.ru.nl</a>>> wrote:<br>
><br>
><br>
> Hi Yoni!<br>
><br>
> The extend of the smoothing, I would say, is under normal<br>
> circumstances<br>
> simply what you<br>
> request as a smoothing paramater (given the dpss<br>
> characteristics), so I<br>
> don't understand<br>
> that formulation exactly.<br>
><br>
> If different smoothings give drastically different result you<br>
> might be<br>
> sampling<br>
> frequencies that behave differently from your frequency of<br>
> interest. In<br>
> your case, e.g.<br>
> perhaps you are adding alpha in your estimate that might<br>
> behave differently<br>
> in your<br>
> paradigm?<br>
><br>
> I would therefor try to first figure out if your effect is, in<br>
> fact,<br>
> frequency specific<br>
> and try to not to smooth more than necessary to capture that<br>
> effect. So<br>
> starting with no<br>
> (extra) smoothing and looking at the TFR for instance. A<br>
> simple FFT would<br>
> give you a<br>
> frequency smoothing of +/- 1/datalength already (e.g. half a<br>
> second would<br>
> be +/- 2 Hz).<br>
> Simply averaging over frequencies (estimated with a Hanning<br>
> taper) instead<br>
> of using the<br>
> slepian tapers might be a better option.<br>
><br>
> Then again, you are limited in frequency specificity by the<br>
> length of the<br>
> data on which<br>
> you calculate them. If that is too short you might have<br>
> suboptimal and<br>
> unexpected<br>
> effects. In the case of slepian filters make sure you have at<br>
> least a<br>
> minimum of 3 tapers<br>
> (which is shown in the output of freqanalysis).<br>
><br>
> There is a lot more to say about tapers, smoothing etc, but I<br>
> hope this<br>
> helps.<br>
><br>
> All the best,<br>
> Stephen<br>
><br>
> On 3 October 2012 15:14, Yoni Levy <<a href="mailto:yoniilevy@gmail.com">yoniilevy@gmail.com</a><br>
> <mailto:<a href="mailto:yoniilevy@gmail.com">yoniilevy@gmail.com</a>>> wrote:<br>
><br>
> > Dear Fieldtrippers,<br>
> ><br>
> > I am trying to locate the source of an oscillatory effect at<br>
> the frequency<br>
> > of 30Hz in a time window of interest.<br>
> > Before running the ft_sourceanalysis function, I run a<br>
> ft_freqanalysis<br>
> > with a frequency smoothing of 8 (cfg.tapsmofrq =8).<br>
> > My question is whether there is any rule of thumb by which I<br>
> could<br>
> > reliably determine the extent of the smoothing?<br>
> > I found out that even small changes in the 'tapsmofrq' value,<br>
> > significantly alter the spatial localization of the<br>
> resulting sources.<br>
> > For instance, a tapsmofreq value of 8 would point to an<br>
> effect in the<br>
> > frontal lobe, whereas a value of 10 would point to an effect<br>
> in the<br>
> > parietal lobe.<br>
> ><br>
> > Any advice would be appreciated.<br>
> ><br>
> > Yoni<br>
> ><br>
><br>
><br>
> _______________________________________________<br>
> fieldtrip mailing list<br>
> <a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a> <mailto:<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a>><br>
> <a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
><br>
><br>
><br>
><br>
> _______________________________________________<br>
> fieldtrip mailing list<br>
> <a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
> <a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<br>
<br>
--<br>
J?rn M. Horschig<br>
PhD Student<br>
Donders Institute for Brain, Cognition and Behaviour<br>
Centre for Cognitive Neuroimaging<br>
Radboud University Nijmegen<br>
Neuronal Oscillations Group<br>
FieldTrip Development Team<br>
<br>
P.O. Box 9101<br>
NL-6500 HB Nijmegen<br>
The Netherlands<br>
<br>
Contact:<br>
E-Mail: <a href="mailto:jm.horschig@donders.ru.nl">jm.horschig@donders.ru.nl</a><br>
Tel: <a href="tel:%2B31-%280%2924-36-68493" value="+31243668493">+31-(0)24-36-68493</a><br>
Web: <a href="http://www.ru.nl/donders" target="_blank">http://www.ru.nl/donders</a><br>
<br>
Visiting address:<br>
Trigon, room 2.30<br>
Kapittelweg 29<br>
NL-6525 EN Nijmegen<br>
The Netherlands<br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20121005/aed5f036/attachment-0001.html" target="_blank">http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20121005/aed5f036/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<br>
End of fieldtrip Digest, Vol 23, Issue 6<br>
****************************************<br>
</blockquote></div><br></div>