<div dir="ltr"><div>Dear Erik,</div><div><br></div><div>As Jan said, it is not possible to obtain power values lower than 1.5 or 2 Hz. However, I may suggest a way to calculate the power values for some parts (worth a try :)). I believe that your data have the opportunity to decrease
at least
1.5 hz, so please
try this assignment cfg.foi = 1.5:0.1:30; I guess that decreasing the step size to 0.1 will also allow you to get power values for some parts between 2-3 Hz (after stimulus onset). One additional point, even if you get power values correctly, you may have some problems with the baseline correction step for lower freqs.</div><div><br></div><div>
fingers crossed :)</div><div><br></div><div>Best<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 27, 2024 at 2:12 PM Schoffelen, J.M. (Jan Mathijs) via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl">fieldtrip@science.ru.nl</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div style="overflow-wrap: break-word;">
Dear Erik,
<div><br>
</div>
<div>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><br>
</div>
<div>Best wishes,</div>
<div>Jan-Mathijs</div>
<div> <br>
<div><br>
<blockquote type="cite">
<div>On 22 Mar 2024, at 13:52, Erik Samuel Nickel via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl" target="_blank">fieldtrip@science.ru.nl</a>> wrote:</div>
<br>
<div>
<div style="padding-bottom:1px">
<div lang="x-unicode">
<p>Hello everyone,<br>
<br>
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>
<br>
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>
<br>
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>
</p>
<p>```<br>
cfg = [];<br>
cfg.method = 'wavelet';<br>
cfg.output = 'pow';<br>
cfg.foi = 2:1:30;<br>
cfg.width = 3;<br>
cfg.pad ='nextpow2';<br>
cfg.toi = -1.5:0.02:2.28;<br>
ft_data_dev = ft_freqanalysis(cfg, ft_data_dev);<br>
```<br>
<br>
<br>
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>
<br>
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>
<br>
To me it seems like the cfg.width plus epoch length should not have these strong boundary effects.<br>
<br>
Do you have any advise what I can change in order to get data in the low frequencies?
<br>
<br>
Best<br>
Erik S. Nickel<br>
<br>
<br>
**PS:**<br>
I am aware of these resources which discuss this topic:<br>
- <a 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" target="_blank">
https://www.fieldtriptoolbox.org/faq/why_does_my_tfr_contain_nans/</a><br>
- <a 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" target="_blank">
https://www.fieldtriptoolbox.org/tutorial/cluster_permutation_freq/</a><br>
- <a 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" target="_blank">
https://mailman.science.ru.nl/pipermail/fieldtrip/2012-June/018208.html</a><br>
</p>
<pre cols="72">--
Erik Samuel Nickel
er/ihm (he/him)
Deutsch, English
M.Sc. Cognitive Science
</pre>
</div>
</div>
<u></u><u></u>_______________________________________________<br>
fieldtrip mailing list<br>
<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" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</div>
</blockquote>
</div>
<br>
</div>
</div>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202" rel="noreferrer" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</blockquote></div>