<div dir="ltr"><div class="gmail_extra">Dear Fieldtrip community,</div><div class="gmail_extra"><br></div><div class="gmail_extra"><span style="color:rgb(0,0,0);white-space:pre-wrap">I am currently doing frequency analysis on an EEG dataset. </span></div><div class="gmail_extra"><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></div><div class="gmail_extra"><span style="color:rgb(0,0,0);white-space:pre-wrap">My question is a general one about the dis/advantages of zero- VS mirror-padding a finite time series </span><span style="color:rgb(0,0,0);white-space:pre-wrap">prior to frequency analysis (ft_freqanalysis). </span></div><div class="gmail_extra"><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></div><div class="gmail_extra"><span style="color:rgb(0,0,0);white-space:pre-wrap">The way ft_freqanalysis is implemented suggests that zero padding is always the best option, </span><span style="color:rgb(0,0,0);white-space:pre-wrap">e.g., ft_freqanalysis does not support mirror padding.</span></div><div class="gmail_extra"><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></div><div class="gmail_extra"><span style="color:rgb(0,0,0);white-space:pre-wrap">However, it seems to me that mirror padding is also a good and a valid way to address the 'missing values' issue at the temporal edges of a TFR. </span></div><div class="gmail_extra"><span style="color:rgb(0,0,0);white-space:pre-wrap">Here is my (intuitive) reasoning:</span></div><div class="gmail_extra"><span style="color:rgb(0,0,0);white-space:pre-wrap">The disadvantage of zero padding is that it </span><span style="color:rgb(0,0,0);white-space:pre-wrap">creates a discontinuity at the edges of the data segment, thus introducing additional frequency content and distorting the power estimates. </span><span style="color:rgb(0,0,0);white-space:pre-wrap">Mirror padding might overestimate the power of the frequencies present, but, to its advantage, it </span><span style="color:rgb(0,0,0);white-space:pre-wrap">preserves the frequency content of the actual data. Short summary: both ways of padding have their strengths and weaknesses, there is no clear winner.</span></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">It would be good to hear what other researchers think about the advantages/disadvantages of the two ways of padding. </div><div class="gmail_extra">Is zero-padding always a better way of padding than mirror- (or any other type of) padding? </div><div class="gmail_extra">Does the answer depend on some further factors?</div><div class="gmail_extra"><br></div><div class="gmail_extra">Best wishes,</div><div class="gmail_extra">Maris</div></div>