<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Dear Erik,
<div class=""><br class="">
</div>
<div class="">I hate to be a party pooper, but I don’t think that there is very much that can be done in this case. Indeed, as you already mentioned, the U-shape is caused by the fact that the FieldTrip routines only return a valid TF-power estimate for time
points that are at least half the corresponding wavelet's (with its frequency specific length) length away from the input epochs’ boundaries. This is just a basic algorithmic limitation. The only way in which the ‘U’ can be widened, is by having longer epochs
in the input, which as I understand from your clear description, cannot be easily changed in your case.</div>
<div class=""><br class="">
</div>
<div class="">Best wishes,</div>
<div class="">Jan-Mathijs</div>
<div class=""> <br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 22 Mar 2024, at 13:52, Erik Samuel Nickel via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl" class="">fieldtrip@science.ru.nl</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div style="padding-bottom: 1px;" class="">
<div class="moz-text-html" lang="x-unicode">
<p class="">Hello everyone,<br class="">
<br class="">
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.<br class="">
<br class="">
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.<br class="">
<br class="">
To perform time-frequency analysis, we have imported the preprocessed data into the FieldTrip format and applied Morlet wavelets using the following code snippet:<br class="">
</p>
<p class="">```<br class="">
cfg = [];<br class="">
cfg.method = 'wavelet';<br class="">
cfg.output = 'pow';<br class="">
cfg.foi = 2:1:30;<br class="">
cfg.width = 3;<br class="">
cfg.pad ='nextpow2';<br class="">
cfg.toi = -1.5:0.02:2.28;<br class="">
ft_data_dev = ft_freqanalysis(cfg, ft_data_dev);<br class="">
```<br class="">
<br class="">
<br class="">
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.<br class="">
<br class="">
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.<br class="">
<br class="">
To me it seems like the cfg.width plus epoch length should not have these strong boundary effects.<br class="">
<br class="">
Do you have any advise what I can change in order to get data in the low frequencies?
<br class="">
<br class="">
Best<br class="">
Erik S. Nickel<br class="">
<br class="">
<br class="">
**PS:**<br class="">
I am aware of these resources which discuss this topic:<br class="">
- <a class="moz-txt-link-freetext" href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.fieldtriptoolbox.org%2Ffaq%2Fwhy_does_my_tfr_contain_nans%2F&data=05%7C02%7Cfieldtrip%40science.ru.nl%7Cfdbddbab1ae144515b8608dc4e48ff52%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638471322617404984%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=UAoUp%2FNz%2Bf9oMMTErBlTeKzhq023QJgLN8DlQOku3KI%3D&reserved=0" originalsrc="https://www.fieldtriptoolbox.org/faq/why_does_my_tfr_contain_nans/" shash="qY79CqVlOX7NVk94WEGGSq4wIfn/mTc6xRCZGrxv3QVx5FaNzPW3yPhW9lPLk56IIY2+TwZAUJWH/F15ezKrEQY7fAO9ZhkBGWSRUGC49O3hyLViNKjHozbC6XzZBh6dE99FZlseNjHSvawosOzy0tA3+gsG9oRokEgkDaTOzCI=" originalsrc="https://www.fieldtriptoolbox.org/faq/why_does_my_tfr_contain_nans/" shash="WF9uhP4ix7saPnyNj0RBoXk1c3j3K6QA12wiFuUhO4gf93nrWy6dCCwi7sTIZy4mQ+HOSdj4XeseI7Ybmf9PqpndKf9WHnWGHgS1T4PW6NP//l1QiRs9bpRFSwyz8lBfFNsfoLJt4JJ5m6KAkrRSPawY/3oKiEPJsJ09zkQHqmI=">
https://www.fieldtriptoolbox.org/faq/why_does_my_tfr_contain_nans/</a><br class="">
- <a class="moz-txt-link-freetext" href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.fieldtriptoolbox.org%2Ftutorial%2Fcluster_permutation_freq%2F&data=05%7C02%7Cfieldtrip%40science.ru.nl%7Cfdbddbab1ae144515b8608dc4e48ff52%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638471322617404984%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=Fh4zcWCh2lnx62JUKSclHqMJYv%2BXhioJ6GriBiO%2BcNE%3D&reserved=0" originalsrc="https://www.fieldtriptoolbox.org/tutorial/cluster_permutation_freq/" shash="T8z0drEU9sbKYjEqhWrIfqA0BTh7z8+JYRjyxyBv1Wkj113AFrnXqdCvOcSgPlZuLjTR+AKC1FcYOvacOeVYXUZKeXWVwL7op5NG+tlvfZazEBZvdLU17umPMYlDyF1m+Gu6RDKAtFVj0N1c7I4ovK+JXr3u2EmkAmUXCz65THw=" originalsrc="https://www.fieldtriptoolbox.org/tutorial/cluster_permutation_freq/" shash="gZdyKvEsSmtbD+8TVMGU5+Eg2unROccJY5Oiw20gMyIwQQvbkk8JtqQC+un7nGas2gi6MZqC0myQa98YcRn1WqvbHEEi/ymZEr4w3nYeZbB/+2zxJdBr6+R8Tf3ZaSBD8+nzfGdgDWLb4sAYQLgneoEqHErGpBY6QTJt6+7lieY=">
https://www.fieldtriptoolbox.org/tutorial/cluster_permutation_freq/</a><br class="">
- <a class="moz-txt-link-freetext" href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fpipermail%2Ffieldtrip%2F2012-June%2F018208.html&data=05%7C02%7Cfieldtrip%40science.ru.nl%7Cfdbddbab1ae144515b8608dc4e48ff52%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638471322617404984%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=F1F4d9Hd5mPcM8wfEnsS5fGk1d2KmS%2F8HODmjjWxmhI%3D&reserved=0" originalsrc="https://mailman.science.ru.nl/pipermail/fieldtrip/2012-June/018208.html" shash="Q1YLIihxv58geH4BJJ7p1lqhIYGOM7E1c8r19cRFbe4ntlw+FUP8dtfb8Kt0xFrR65UqxurC8Fw3r2h+cJ+JRHMdPs99RvpTgVda92/YzA9eRH5oXxbYlEtPFVItQ+1c645D9hVVsn0rDUxx4u3FBS+oOCczpdVcwbUwgTZV1VY=" originalsrc="https://mailman.science.ru.nl/pipermail/fieldtrip/2012-June/018208.html" shash="XVGkkO91NfIVNfdjlaaTkT2dA1Nx2jJrnUbD3sQn/Lyp382JQ/NrkregXoxttX5vhscnw1shzRs4fTul6iooKiV7FM3Bb4ZFBurdfpbA7dDnNwKPxDBEa7KJ3gYECvR0IuePDe5zdy+hN2TEJvV2u0ULVafulOSpdLtoA71hWnY=">
https://mailman.science.ru.nl/pipermail/fieldtrip/2012-June/018208.html</a><br class="">
</p>
<pre class="moz-signature" cols="72">--
Erik Samuel Nickel
er/ihm (he/him)
Deutsch, English
M.Sc. Cognitive Science
</pre>
</div>
</div>
<lt-container class=""></lt-container>_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=05%7C02%7Cfieldtrip%40science.ru.nl%7Cfdbddbab1ae144515b8608dc4e48ff52%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638471322617404984%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=fdHgD5qFiwXyVQAnp7LxKis3kf9yEsyuun9wTMbXhzw%3D&reserved=0" originalsrc="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" shash="CDawBsJzcT+xwZKlBeydh9vstnTWlSULogs8W/ATtGH3+0Af6hE9kKglO3WU7LHMOeleeSt+Suuyel4Y5breueDKiJBM7gJTJ/MIbG4KFeBnbZ7jrZ26fECqCbmcEj+JZyU4WBxYOKJXmt4QdAFPN9qiCLiu2/gEvGeLlsvWbOw=" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class="">
https://doi.org/10.1371/journal.pcbi.1002202<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>