Print

Print


It's one over the time window. In wavelet case it varies with frequency but in your case it's around 0.6 Hz.

Vladimir


On Tue, Nov 6, 2012 at 4:50 PM, Jun Wang <[log in to unmask]> wrote:
thanks Vladimir, now I get it. one follow up question, how can I calculate the true frequency resolution and in this case. 


Jun

On Tue, Nov 6, 2012 at 6:39 AM, Vladimir Litvak <[log in to unmask]> wrote:
Dear Jun,

I think your baseline period is just too short to get a good estimate for such a low frequency with any method. You can basically get one point or a few points that will not be independent. I checked the code and effectively it works as if your data was zero-padded. So if your wavelet is centered at -800 ms it integrates over data from -800 up to -50. Starting at -750 the wavelet starts overlapping  the post-stimulus period and you should be aware of that. You can play with the following code to get an intuition (based on spm_eeg_specest_morlet):

time = -800:2:1500;
dat = 0*time;
dat(1) = 1; % you can put 1 also in other places
M = spm_eeg_morlet(3, 2, 2)
tmp = conv(dat, M{1});
tmp = tmp([1:length(time)] + (length(M{1})-1)/2);
figure;plot(time, abs(tmp))

Best,

Vladimir


On Mon, Nov 5, 2012 at 5:15 PM, Jun Wang <[log in to unmask]> wrote:
thanks,Vladimir. but I am more confused. for -50ms, I understand it will be calculated based on (-750,0) and (-50,700),how about time point before that. like -500ms,in which time window it will be calculated. Also how to calculate the true frequency resolution. finally, in order to best capture the pre-stimulus low frequency activities interdependently,what's the best way to set, should I use multitaper instead?

thanks
Jun


On Mon, Nov 5, 2012 at 9:03 AM, Vladimir Litvak <[log in to unmask]> wrote:
Dear Jun,

Your calculation makes sense but note that with 3 cycles at 2 Hz all your pre-stimulus points will be computed based on both pre- and post-stimulus data. The first point at -50ms will have slightly more than half of its support before the stimulus and the later points even less than that. 

The frequency axis does not depend of the number of cycles but you can change it manually by specifying your desired frequency bins. You can have more frequency bins than your true frequency resolution and in this case the adjacent bands will not be linearly independent.

Best,

Vladimir


On Sun, Nov 4, 2012 at 4:41 PM, Jun Wang <[log in to unmask]> wrote:
Dear Vladimir,
  I am doing TF right now. My data has 800ms prestimulus window. Based on the spm manual, in order to get low frequency (2Hz), I set wavelets cycles number to be 3. then  (3/2)* 1000/2 =750ms which is within my 800ms pre stimulus window range. Is this the correct way to set. Also I noticed if I set frequencies of interest to be [2:48], the output TF frequecies will be always[2 3 4.....48] no matter how many wavelet cycles I set. Shouldn't the frequency resolution depend on wavelet cycles setting?  Could you help me out here.


thanks

Jun