[FieldTrip] best parameters for wavelet convolution.

Stephen Whitmarsh stephen.whitmarsh at gmail.com
Thu Feb 18 07:59:33 CET 2021


Dear Mubeen,

1) My short answer would be:

a) There are very good "Fieldtip Lectures" on the topic that addresses
questions of frequency resolution and time-windows in general and which
would be a good place to start.
There are several people presenting nearly the same slides, so you can take
a pick based on flavour, e.g.:
https://www.youtube.com/watch?v=QLvsa1r1Voc
https://www.youtube.com/watch?v=vwPpSglPJTE
https://www.youtube.com/watch?v=dHTuzMsjVJA

b) If you really want to estimate power changes *over time*, using wavelets
is one way, and using tapered sliding time-windows using FFT is another
('cfg.method = 'mtmconvol'). The latter allows you even more freedom in how
much you want to smooth over frequencies (see lectures for explanation of
"multi tapering").

d) Your question suggests, however, that you would like to capture the
1-4Hz peaks in SWDs *averaged over time*. For this you would not
necessarily need a time-resolved frequency estimate, right? E..g. an
averaged FFT done on each segment might suffice and be more to the point.
Wavelets do not come into play then. Correct me if I'm wrong! Perhaps doing
a peak detection on the spikes - and calculating the inter-spike intervals
- might be another approach.

c) If you are set on doing a time-resolved spectral analysis, then you will
probably be able to see broad-band high-frequency power associated with the
SWD peaks. However, to accurately estimate power at lower frequencies,
especially as low as 1Hz, you might need time-widows of over a second (e.g.
3 seconds if you want to base it on 3 cycles of 1Hz, which would be a bare
minimum). So you might not be able to resolve those low frequencies over
time. Again, I think the lecture might clarify this point, and I am not
sure you are asking for time-resolved analysis.

d) Feel free to experiment with different parameters, this will give you a
sense of the data and limits of frequency analyses, and the effect of
certain parameters. In the end it also depends on how stationary the
spectral content of the signal is, which is sometimes hard to determine
a-priori.

e) Wavelets can be easily used in a way that creates far more data than
necessary, e.g. by resolving at every sample, instead of in e.g. steps of
tens of milliseconds. So you might want to keep memory usage and CPU time
in mind. A bit of experimentation might help you set parameters that are
"good enough" but don't overload your computer's resources.

2a) Baseline normalization of the timecourses is a good idea before
frequency analysis:
https://www.fieldtriptoolbox.org/faq/why_does_my_tfr_look_strange/

2b) Baseline normalization of the time-resolved power estimates can only be
done *after *doing the spectral estimates, right? If/when depends on the
reason you want to do so though. For exploring and plotting, note that you
can do it 'on the fly' in FieldTrip's plotting functions.

Anyway, that's the 'short' answer. I might be able to say more if I know
more about the goal of the frequency analysis of PWDs (with which I am
somewhat familiar). And check the videos!

Happy fieldtripping,
Stephen


Op do 18 feb. 2021 om 07:10 schreef mubeen afzal <mubafzal at hotmail.com>:

> Hi all,
>
> I am aiming to calculate average spectral values for segment of EEG
> containing spike/wave discharges in patients which can last anywhere
> between 0.5 seconds to 6 seconds. I am planning on morlet wavelet
> convolution but am unsure what the best parameters would be in terms of
> width/cycles/timewin of the morlet configurations. Typically these
> spike/waves on visual inspection are anywhere between 1hz to more commonly
> between 3-4 Hz or less often 5 hz frequency discharges.
>
>
>    1. What would be the best parameters for a wavelet convolution?
>
>  2. is baseline normalization usually done before spectral analysis or can
> it be done after?
>
>
> Any help would be highly appreciated.
>
> Regards,
> Mubeen J
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> https://doi.org/10.1371/journal.pcbi.1002202
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20210218/f57b0fd9/attachment.htm>


More information about the fieldtrip mailing list