I have some time-locked LFP data and want to run a time-frequency analysis. However, when looking at the generated spectrogram (using tfr_multitaper), we notice that the spectral estimate is smeared around the time of interest. While I get that it is owing to the frequency-time tradeoff, I wonder if there is a way to ensure that the window the estimate is calculated on is not centred on the time of interest but only takes values before the time of interest.
If this sounds confusing, what I mean is, assuming the time of interest is t and the width of the time window is w, instead of computing the spectral estimates at (t-w/2, t+w/2), is it possible to compute it using (t-w, t).
This was discussed in office hours today. Rough consensus was “this is the nature of the time-frequency tradeoff” and there’s not a lot of wiggle room to get around it. Some notes:
research question relates to whether subject behavior is stimulus-induced or not
frequencies below ~10Hz not really of interest
at ~10Hz they’re seeing activity up to 200ms pre-stimulus
General ideas were:
shorten your wavelets (reduce n_cycles)
do a standard FFT and set the window length very small
research temporally asymmetrical wavelets, and if you find one that looks promising, hack it in to MNE-Python (and tell us about it; if we know there’s a use case for passing in custom wavelet arrays then we can try to better support that in the public API). A quick search led me to the Daubechies wavelet - Wikipedia but I’ve no idea if that’s suitable here; this MATLAB page and this other MATLAB page may also be helpful.