[FieldTrip] Mitigating boundary effects with Morlet wavelets

Erik Samuel Nickel erik.samuel.nickel at ut.ee
Fri Mar 22 13:52:37 CET 2024


Hello everyone,

My name is Erik Nickel, I am currently working at the University of 
Tartu. I need advice regarding time-frequency analysis of EEG data in 
the context of language development research with children diagnosed 
with developmental language disorder (DLD), specifically focusing on 
Estonian-speaking children.

We have been conducting an auditory oddball paradigm study, where we 
collected EEG data using a 32-channel BioSemi system. Prior to analysis, 
we preprocessed the data using the MADE pipeline, which is based on 
EEGLAB. The preprocessing steps included highpass filtering at 0.3Hz, 
lowpass filtering at 50Hz, and baseline correction using a baseline 
period of [-100 0] ms. The epochs were defined from -1500 ms to 2300 ms 
around the stimulus onset, with our primary time of interest being [0 
700] ms post-stimulus onset.

To perform time-frequency analysis, we have imported the preprocessed 
data into the FieldTrip format and applied Morlet wavelets using the 
following code snippet:

```
cfg           = [];
cfg.method    = 'wavelet';
cfg.output    = 'pow';
cfg.foi       = 2:1:30;
cfg.width     = 3;
cfg.pad       ='nextpow2';
cfg.toi       = -1.5:0.02:2.28;
ft_data_dev   = ft_freqanalysis(cfg, ft_data_dev);
```


Our aim is to investigate power spectrum, phase, and connectivity 
analysis in the context of language development, particularly focusing 
on low frequencies ranging from 2 to 3 Hz up to 30 Hz.

However, I have encountered challenges in obtaining meaningful data for 
low frequencies, especially at 2 and 3 Hz, where the resulting values 
are NaN as well as in higher frequencies but not over all time point. 
The resulting time frequency representation has the the U shape 
described before in resources mentioning boundary effect. I suspect that 
this issue may be related to boundary effects, as our epochs may not 
adequately capture the low-frequency oscillatory patterns.

To me it seems like the cfg.width plus epoch length should not have 
these strong boundary effects.

Do you have any advise what I can change in order to get data in the low 
frequencies?

Best
Erik S. Nickel


**PS:**
I am aware of these resources which discuss this topic:
- https://www.fieldtriptoolbox.org/faq/why_does_my_tfr_contain_nans/
- https://www.fieldtriptoolbox.org/tutorial/cluster_permutation_freq/
- https://mailman.science.ru.nl/pipermail/fieldtrip/2012-June/018208.html

-- 
Erik Samuel Nickel
er/ihm (he/him)
Deutsch, English
M.Sc. Cognitive Science
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20240322/e28e5196/attachment.htm>


More information about the fieldtrip mailing list