<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 Alison,
<div class=""><br class="">
</div>
<div class="">Thanks for the feedback, and good to hear that you now found (and fixed) the root cause of the issue!</div>
<div class=""><br class="">
</div>
<div class="">Best wishes, and keep up the good work.</div>
<div class=""><br class="">
</div>
<div class="">Jan-Mathijs</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">PS: one important take home message of all this is that - when comparing power spectra between groups/conditions - the 0-padding should be the same across conditions compared.<br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 4 Mar 2023, at 19:57, Harris, Alison <<a href="mailto:Alison.Harris@ClaremontMcKenna.edu" class="">Alison.Harris@ClaremontMcKenna.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
Dear Jan-Mathijs,<o:p class=""></o:p></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
Thank you for your response! (And, yes, I had forgotten to mention that the data is log10 transformed after the call to ft_freqstatistics.)<o:p class=""></o:p></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
Now that I know what to look for in the cfg, I can see that the pad length is different between the 2018 and 2019 versions, and I can see the latency issue from ft_timelockanalysis as well. If I encounter any issues going forward, I will make sure to double-check
 the cfg first!<o:p class=""></o:p></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
However, I was still curious as to why the pad lengths were different for the two conditions (finger-tapping vs. rest) within the 2019 version of FieldTrip. After inspecting the cfg information as you suggested, I found an issue with the cfg latency related
 to the epoch time limits I had specified in EEGLAB. Now that is fixed, the difference in padlength between the two conditions appears fully resolved.<o:p class=""></o:p></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
Thank you again for your help!<o:p class=""></o:p></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
Alison<o:p class=""></o:p></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt;" class="">--<o:p class=""></o:p></span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt;" class="">Alison Harris, PhD</span><span style="" class=""><o:p class=""></o:p></span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt;" class="">Ostby-Cook Associate Professor of Psychology & George R. Roberts Fellow</span><span style="" class=""><o:p class=""></o:p></span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt;" class="">Claremont McKenna College</span><span style="" class=""><o:p class=""></o:p></span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt;" class="">850 Columbia Avenue</span><span style="" class=""><o:p class=""></o:p></span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt;" class="">Claremont, CA 91711</span><span style="" class=""><o:p class=""></o:p></span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt;" class="">Phone: (909) 607-9397</span><span style="" class=""><o:p class=""></o:p></span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt;" class="">Email:<span class="Apple-converted-space"> </span><a href="mailto:aharris@cmc.edu" style="color: purple; text-decoration: underline;" class="">aharris@cmc.edu</a></span><span style="" class=""><o:p class=""></o:p></span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt;" class="">Web:<span class="Apple-converted-space"> </span><a href="https://urldefense.com/v3/__http://www1.cmc.edu/pages/faculty/AHarris__;!!HJOPV4FYYWzcc1jazlU!52Ow35M2EdLFn-nJgEpnXNu1mWR09SR0lMlWGFt0sRkCMp3CbLax81t55CUXqXaTmc4fAji1WD4IbSFVcKPc01q5684GbfvPSVHtEbB_k4NCsg0TXw$" style="color: purple; text-decoration: underline;" class="">http://www1.cmc.edu/pages/faculty/AHarris</a></span><span style="" class=""><o:p class=""></o:p></span></div>
</div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
<div class="">
<div style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(225, 225, 225); padding: 3pt 0in 0in;" class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<b class="">From:</b><span class="Apple-converted-space"> </span>fieldtrip <<a href="mailto:fieldtrip-bounces@science.ru.nl" class="">fieldtrip-bounces@science.ru.nl</a>><span class="Apple-converted-space"> </span><b class="">On Behalf Of<span class="Apple-converted-space"> </span></b>Schoffelen,
 J.M. (Jan Mathijs) via fieldtrip<br class="">
<b class="">Sent:</b><span class="Apple-converted-space"> </span>Saturday, March 4, 2023 5:42 AM<br class="">
<b class="">To:</b><span class="Apple-converted-space"> </span>FieldTrip discussion list <<a href="mailto:fieldtrip@science.ru.nl" class="">fieldtrip@science.ru.nl</a>><br class="">
<b class="">Cc:</b><span class="Apple-converted-space"> </span>Schoffelen, J.M. (Jan Mathijs) <<a href="mailto:janmathijs.schoffelen@donders.ru.nl" class="">janmathijs.schoffelen@donders.ru.nl</a>><br class="">
<b class="">Subject:</b><span class="Apple-converted-space"> </span>Re: [FieldTrip] Change in output of ft_freqanalysis<o:p class=""></o:p></div>
</div>
</div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
Dear Alison,<span class="Apple-converted-space"> </span><o:p class=""></o:p></div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
Thanks for your detailed report.<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
Given that you did not send along any time domain data in the data you shared, I tried to reproduce your observation by simulating some data, and then passing those data on to ft_freqanalysis, in 4 different versions of the fieldtrip code: 20171231, 20181231,
 20191231, and today’s version. I did not manage to reproduce your issue, that is, all four sets of spectra are numerically identical. Based on this, there is no reason to suspect that something changed in the code.<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
Next, I inspected some of the data that you shared, specifically the files:<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
S005_Action_FreqCorr.mat<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
S005_Action_FreqCorrFFT_Boot_2018.mat<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
S005_Action_FreqCorrFFT_Boot_2019.mat<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
I can confirm that the power spectra look different, but upon inspection of the cfg’s of the data objects; <variable>.cfg -> so were the cfgs!<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
In other words, my working hypothesis is now that the cfg details cause the changes in the spectra.<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
The specification of cfg.taper/cfg.tapsmofrq influences the shape of the spectra, but I won’t discuss that aspect any further here.<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
Specifically what seems to explain your observations, are the different values of the cfg.pad parameter.  This value has an effect on the overall scaling of the spectra, which could explain the vertical shift of some of the spectra that you reported (BTW, as
 a side note, I don’t understand why the values in the spectra are < 0 for the higher frequencies: this suggests that the numbers were post-processed in some way, because power is always postive, so I suspect an undocumented/unmentioned log10 transform or so).<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
In more detail: if you increase the padding parameter, the extra zero-padding ramps up the spectral resolution of the power spectrum, which means that all signal power is to be divided across a larger amount of frequency bins. This reduces the amount of energy
 per bin, and may explain the overall shift down if the padding is increased. This is because the integral of the power spectrum (i.e. the sum across all frequency bins - which amounts to more bins than you may have requested for your output) should amount
 to the total variance of the underlying signal. If I subtract the ‘2018’ file’s power spectrum from the ‘2019’ file’s power spectrum I get an on average difference of 0.3, which is in line with the log10(2) difference implied by an increase of the padding
 parameter from 8 to 16.<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
Now, what was a bit confusing to me is the fact that I noticed the difference in padding when looking at the value of  <variable>.cfg.pad. This is the number that is used in the algorithm, and which relates to the lengthy paragraph above. When I looked a bit
 further, in <variable>.cfg.callinfo.usercfg.pad I noticed the ’nextpow2’, which is the default value that you also reported in your e-mail. So, somehow FieldTrip’s translation of ’nextpow2’ into a numeric value for padding was different in the two versions.
 Then I recursed into the function call history, and noticed that the call to ft_freqanalysis was preceded by a call to ft_timelockanalysis. Now my suspicion is that it could be that there was a change in the code of ft_timelockanalysis, between end 2018 and
 2019. This indeed seems to be the case. The cfg to ft_timelockanalysis contained an option cfg.latency = [1 9]. This option, however, was not functional in the 2018 version (I tried it myself and got a warning that the option cfg.latency was forbidden, and
 removed from the cfg). In the 2019 version the latency selection was functional. In other words, when subjecting the data to ft_timelockanalysis of 2018 did NOT lead to a cutting of 8 seconds of data, and hence to potentially longer than 8 seconds of data
 that served as an input into ft_freqanalysis, which consequently translated ’nextpow2’ into 16 seconds of padded with 0’s data, rather than the value of 8 in the 2019 version.<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
I hope this helps, I am going back to BWV867 now.<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
Best wishes,<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
Jan-Mathijs<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
</div>
<div class="">
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
</div>
<div class="">
<blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class="">
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
On 3 Mar 2023, at 20:50, Harris, Alison via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl" style="color: purple; text-decoration: underline;" class="">fieldtrip@science.ru.nl</a>> wrote:<o:p class=""></o:p></div>
</div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
<div class="">
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="color: rgb(33, 33, 33);" class="">Dear FieldTrip community,</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="color: rgb(33, 33, 33);" class=""> </span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="color: rgb(33, 33, 33);" class="">My name is Alison Harris and I have been using FieldTrip functions for time-frequency analysis for several years now as part of my EEG research. However, I recently attempted to re-analyze some old data using ft_freqanalysis
 in the latest version of FieldTrip, and the output does not match my earlier results.</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="color: rgb(33, 33, 33);" class=""> </span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="color: rgb(33, 33, 33);" class="">I am trying to perform a frequency analysis for a motor execution task with alternating 8-s periods of finger-tapping and rest. The two conditions are preprocessed in EEGLAB and then separately imported to FieldTrip
 for frequency analysis. The cfg and command are as follows:</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="color: rgb(33, 33, 33);" class=""> </span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="color: rgb(33, 33, 33);" class="">    freqcfg = [];</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="color: rgb(33, 33, 33);" class="">    freqcfg.method = 'mtmfft';</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="color: rgb(33, 33, 33);" class="">    freqcfg.output = 'pow';</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="color: rgb(33, 33, 33);" class="">    freqcfg.keeptrials       = 'no';</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="color: rgb(33, 33, 33);" class="">    freqcfg.keeptapers       = 'no';</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="color: rgb(33, 33, 33);" class="">    freqcfg.foi = [1:30];</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="color: rgb(33, 33, 33);" class="">    freqcfg.taper = 'dpss';</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="color: rgb(33, 33, 33);" class="">    freqcfg.tapsmofrq  = 1;</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="color: rgb(33, 33, 33);" class="">    freqcfg.pad              = 'nextpow2';</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="color: rgb(33, 33, 33);" class="">   <span class="apple-converted-space"> </span>freqcfg.feedback         = 'text';</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="color: rgb(33, 33, 33);" class="">    [freqdata] = ft_freqanalysis(freqcfg,tldata);</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="color: rgb(33, 33, 33);" class=""> </span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="color: rgb(33, 33, 33);" class="">When I initially ran this analysis in 2019, the power spectra for action and rest conditions were largely overlapping. However, when I reran the analysis earlier this week (using the same data and cfg), the two
 power spectra were offset, such that one power spectrum was noticeably lower on the y-axis than the other. For the two participants I examined, there was not a consistent pattern in terms of which power spectrum was offset: the power spectrum for the finger-tapping
 condition was higher in one, whereas the resting power spectrum was lower in the other.</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="color: rgb(33, 33, 33);" class=""> </span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="color: rgb(33, 33, 33);" class="">I then tested out my program with two earlier versions of FieldTrip that were available for download: fieldtrip-20191231 and fieldtrip-20191213. The change in the output of ft_freqanalysis seems to date to the
 2019 version, as the 2018 output looked more similar to my existing results from a previous version of FieldTrip. I also tried specifying the “polyremoval” parameter, and redid the preprocessing in EEGLAB with and without detrending, but none of these changes
 seem to fundamentally affect the offset of the power spectra.<span class="apple-converted-space"> </span></span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="color: rgb(33, 33, 33);" class=""> </span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="color: rgb(33, 33, 33);" class="">Here is a link with data from two participants and plots of the power spectra from before and after 2019:<span class="apple-converted-space"> </span><a href="https://urldefense.com/v3/__https:/claremontmckenna.box.com/s/gu796rvvsgipnwkm4cb13k5fhtdpu5f0__;!!HJOPV4FYYWzcc1jazlU!_AWV1fOSVX5tHme3OeHf6q76srFJ4TcvvLtenRnbF2VDh6fOQW4CMFSLoytvKYc-XQQjU18ERSfYG-nv1jeraFpKi4vjyHuaNupSNy8$" title="https://claremontmckenna.box.com/s/gu796rvvsgipnwkm4cb13k5fhtdpu5f0" style="color: purple; text-decoration: underline;" class=""><span style="color: rgb(0, 120, 215);" class="">https://claremontmckenna.box.com/s/gu796rvvsgipnwkm4cb13k5fhtdpu5f0</span></a>.</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="color: rgb(33, 33, 33);" class=""> </span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="color: rgb(33, 33, 33);" class="">Is there some difference in how the ft_freqanalysis command is called from 2019 onward that would explain this output?<span class="apple-converted-space"> </span></span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="color: rgb(33, 33, 33);" class=""> </span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="color: rgb(33, 33, 33);" class="">Thank you for your help!</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="color: rgb(33, 33, 33);" class="">Alison Harris</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="color: rgb(33, 33, 33);" class=""> </span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt;" class="">--</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt;" class="">Alison Harris, PhD</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt;" class="">Ostby-Cook Associate Professor of Psychology & George R. Roberts Fellow</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt;" class="">Claremont McKenna College</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt;" class="">850 Columbia Avenue</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt;" class="">Claremont, CA 91711</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt;" class="">Phone: (909) 607-9397</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt;" class="">Email: <a href="mailto:aharris@cmc.edu" title="mailto:aharris@cmc.edu" style="color: purple; text-decoration: underline;" class=""><span style="color: rgb(5, 99, 193);" class="">aharris@cmc.edu</span></a></span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt;" class="">Web: <a href="https://urldefense.com/v3/__https:/www1.cmc.edu/pages/faculty/aharris__;!!HJOPV4FYYWzcc1jazlU!_AWV1fOSVX5tHme3OeHf6q76srFJ4TcvvLtenRnbF2VDh6fOQW4CMFSLoytvKYc-XQQjU18ERSfYG-nv1jeraFpKi4vjyHua46XzWYw$" title="https://www1.cmc.edu/pages/faculty/aharris" style="color: purple; text-decoration: underline;" class=""><span style="color: rgb(5, 99, 193);" class="">https://www1.cmc.edu/pages/faculty/aharris</span></a></span><o:p class=""></o:p></div>
</div>
<div class="">
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
 <o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt;" class=""> </span><o:p class=""></o:p></div>
</div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
 <o:p class=""></o:p></div>
</div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10.5pt; font-family: Helvetica, sans-serif;" class="">_______________________________________________<br class="">
fieldtrip mailing list<br class="">
</span><a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" style="color: purple; text-decoration: underline;" class=""><span style="font-size: 10.5pt; font-family: Helvetica, sans-serif; color: rgb(5, 99, 193);" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</span></a><span style="font-size: 10.5pt; font-family: Helvetica, sans-serif;" class=""><br class="">
</span><a href="https://urldefense.com/v3/__https:/doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!6-XHrlUkkd_1vVSBACjQ5qHDM_nHf2XPA6MhiyMtazq0wT8M-I6yHJf_JCkX0wwtBcqY4Id84no93eWi4zDChGcV9iQ5SThIWVw8vg$" style="color: purple; text-decoration: underline;" class=""><span style="font-size: 10.5pt; font-family: Helvetica, sans-serif; color: rgb(5, 99, 193);" class="">https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!6-XHrlUkkd_1vVSBACjQ5qHDM_nHf2XPA6MhiyMtazq0wT8M-I6yHJf_JCkX0wwtBcqY4Id84no93eWi4zDChGcV9iQ5SThIWVw8vg$</span></a></div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>