<div dir="ltr">hi all,<div><br></div><div>Just wanted to chime in that I've noticed this (or something similar), too.</div><div><br></div><div>I typically epoch continuous sleep data into 30 s "trials" to exclude bad epochs, before stitching everything back together using eeg_epoch2continuous.</div><div><br></div><div>When I then apply a highpass filter [pop_eegfiltnew(EEG,0.3,0)], I often see subtle but clear jumps right at the edge of where my epoch boundaries used to be. Critically, these jumps were there even if no data had been removed in between. In contrast, just filtering the original continuous data works fine.</div><div><br></div><div>I checked to see if the continuous->epoched and epoched->continuous transformations somehow resulted in skipping a sample, or some other change of amplitude, but amplitude values were identical across boundaries in all cases. It's as if the pop_eegfiltnew function somehow notices when continuous data previously existed in an epoched form, and alters its behavior based on that...</div><div><br></div><div>My ugly workaround has been to do all my filtering on continuous data (even if it includes lots that I know will be rejected anyway), but would be good if this issue were remedied.</div><div><br></div><div>Roy</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Jul 17, 2018 at 6:54 AM Erickson <<a href="mailto:ericksonb.eng@gmail.com" target="_blank">ericksonb.eng@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default"><div class="gmail_default" style="color:rgb(68,68,68);font-family:"trebuchet ms",sans-serif">Thanks for your responses.</div><div class="gmail_default" style="color:rgb(68,68,68);font-family:"trebuchet ms",sans-serif"><br></div><div class="gmail_default" style="color:rgb(68,68,68);font-family:"trebuchet ms",sans-serif">Andreas, I used the "basic FIR filter" on automatic order calculation filtering from 1 to 55.</div><div class="gmail_default" style="color:rgb(68,68,68);font-family:"trebuchet ms",sans-serif"><br></div><div class="gmail_default" style="color:rgb(68,68,68);font-family:"trebuchet ms",sans-serif">Here is a drive link to a zip file with 30s of example data. These data were imported using fileIO and the event channel (65) was imported as events (Nothing else has been done to this example data).</div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><font color="#444444" face="trebuchet ms, sans-serif"><a href="https://drive.google.com/open?id=1KPlpeBCrCnQJHCJOcMYsnNSJVOjj0bTO" target="_blank">https://drive.google.com/open?id=1KPlpeBCrCnQJHCJOcMYsnNSJVOjj0bTO</a></font></blockquote><div class="gmail_default" style="color:rgb(68,68,68);font-family:"trebuchet ms",sans-serif"><br></div><div class="gmail_default" style="color:rgb(68,68,68);font-family:"trebuchet ms",sans-serif">Then I plotted the data and cut out one section around a TMS event, and another section NOT around a TMS event;</div><blockquote class="gmail_quote" style="color:rgb(68,68,68);font-family:"trebuchet ms",sans-serif;margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">EEG = eeg_eegrej( EEG, [4615 5372;11482 12002]);<br>[ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG, EEG, 1,'setname','with Rejections','gui','off'); </blockquote><div class="gmail_default" style="color:rgb(68,68,68);font-family:"trebuchet ms",sans-serif"><br></div><div class="gmail_default" style="color:rgb(68,68,68);font-family:"trebuchet ms",sans-serif">filtered the data using the FIR filter from 1 to 55hz;</div><blockquote class="gmail_quote" style="color:rgb(68,68,68);font-family:"trebuchet ms",sans-serif;margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">EEG = pop_eegfiltnew(EEG, 1,55,6600,0,[],1);<br>[ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG, EEG, 2,'setname','with Rejections and Filter','gui','off'); <br></blockquote><div class="gmail_default" style="color:rgb(68,68,68);font-family:"trebuchet ms",sans-serif"><br></div><div class="gmail_default" style="color:rgb(68,68,68);font-family:"trebuchet ms",sans-serif">then plotting the data, the artifact is visible as a "pinching" around each boundary, with a faster oscillation riding on top. So basically just reject any section of data and filter and the artifact appears.</div></div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif;color:rgb(68,68,68)">Makoto, to answer the question about the spectra - if I cut out the TMS pulses and then filter, the PSD looks pretty normal. Prior to filtering there is so much DC power I can't visually inspect the data very well.</div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif;color:rgb(68,68,68)"><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif;color:rgb(68,68,68)">The room is very noisy, but this artifact appears only wherever I make a boundary and filter so it seems like an edge effect due to filtering - but I've never encountered this kind of artifact before since EEGLAB knows not to filter over boundaries. Perhaps I cannot use the automatic filter order here due to some noise profile in my data?</div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif;color:rgb(68,68,68)"><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif;color:rgb(68,68,68)">Thanks to you both for considering the problem!</div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif;color:rgb(68,68,68)"><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif;color:rgb(68,68,68)">Brian</div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 12, 2018 at 8:54 PM, Makoto Miyakoshi <span dir="ltr"><<a href="mailto:mmiyakoshi@ucsd.edu" target="_blank">mmiyakoshi@ucsd.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Dear Erickson<div><br></div><div>Is this really a distortion introduced by the filter? Rather, isn't it the case that that portion of the data was poorly filtered i.e., your original data, before filtering, had that noise constantly? Could you please check your original data by eyeballing the raw time series and by checking power spectral density?</div><div><br></div><div>Makoto</div></div><br><div class="gmail_quote"><div><div class="m_3210736851365223949m_4775611883208047062m_6282254647934530271gmail-m_4873228945203488449h5"><div dir="ltr">On Thu, Jul 12, 2018 at 10:33 AM Erickson <<a href="mailto:ericksonb.eng@gmail.com" target="_blank">ericksonb.eng@gmail.com</a>> wrote:<br></div></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="m_3210736851365223949m_4775611883208047062m_6282254647934530271gmail-m_4873228945203488449h5"><div dir="ltr"><div class="gmail_default"><span style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><div class="gmail_default" style="color:rgb(68,68,68);font-family:"trebuchet ms",sans-serif;font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial">Hello EEGLAB list,</div><div class="gmail_default" style="color:rgb(68,68,68);font-family:"trebuchet ms",sans-serif;font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial"><br></div><div class="gmail_default" style="color:rgb(68,68,68);font-family:"trebuchet ms",sans-serif;font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial">We are experiencing a strange artifact on only some of our EEG data. For some subjects, when we cut out portions of data (creating boundary events) and then filter (from 1 to 40 or 50hz) we observe a distortion around the boundary.</div><div class="gmail_default" style="color:rgb(68,68,68);font-family:"trebuchet ms",sans-serif;font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial"><br></div><div class="gmail_default" style="color:rgb(68,68,68);font-family:"trebuchet ms",sans-serif;font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial">Specifically, we see a rising or falling wave on either side of the boundary, with a fast oscillation riding on top of it. See here: <span style="font-size:12.8px"><a href="https://drive.google.com/open?id=1yt6h_WLgI6jWAApVd52nwVLuiduYgXIH" target="_blank">https://drive.google.com/open?id=1yt6h_WLgI6jWAApVd52nwVLuiduYgXIH</a></span></div><div class="gmail_default" style="color:rgb(68,68,68);font-family:"trebuchet ms",sans-serif;font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial"><br></div><div class="gmail_default" style="color:rgb(68,68,68);font-family:"trebuchet ms",sans-serif;font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial"><div><span style="font-size:12.8px">Although this data is from concurrent TMS-EEG recording, the distortion has nothing to do with the TMS pulse itself - we get the same boundary-related distortion when we filter after cutting out a random section of continuous data (a section with no TMS in it).</span><br></div></div><div class="gmail_default" style="color:rgb(68,68,68);font-family:"trebuchet ms",sans-serif;font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial"><br></div><div class="gmail_default" style="color:rgb(68,68,68);font-family:"trebuchet ms",sans-serif;font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial">I am at a loss - we've tried a few different filters and nothing seems to solve this issue. Meanwhile, on some subjects there is no boundary-related filter distortion at all! <span style="font-size:12.8px">There is a lot of noise in the room but I'm not sure how that could create this specific issue.</span></div><div class="gmail_default" style="color:rgb(68,68,68);font-family:"trebuchet ms",sans-serif;font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial"><br></div><div class="gmail_default" style="color:rgb(68,68,68);font-family:"trebuchet ms",sans-serif;font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial">Any perspectives on this issue are appreciated! Thank you,</div><div class="gmail_default" style="color:rgb(68,68,68);font-family:"trebuchet ms",sans-serif;font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial"><br></div><div class="gmail_default" style="color:rgb(68,68,68);font-family:"trebuchet ms",sans-serif;font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial">Brian</div><div class="gmail_default" style="color:rgb(68,68,68);font-family:"trebuchet ms",sans-serif;font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial"><br></div></span><b style="font-size:12.8px;text-align:-webkit-auto;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;color:rgb(0,51,119)">Brian Erickson</b><span style="text-align:-webkit-auto;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;font-size:10pt;color:rgb(0,51,119)"><b>, Ph.D.</b></span><div style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><font face="times new roman, serif"><span style="font-size:13.3333px"><i>Postdoctoral Researcher, CogNeW Lab</i></span></font></div><div style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><div><font face="Helvetica Neue, serif" style="font-size:12.8px"><span style="font-size:13.3333px"><b><br></b></span></font><b style="font-size:12.8px;text-align:-webkit-auto;font-family:helvetica"><span style="color:rgb(0,51,119)"><font face="Arial, sans-serif"><span style="font-size:10pt">Drexel University</span></font></span></b><br style="font-size:12.8px"><span style="text-align:-webkit-auto;font-family:"times new roman",serif;font-size:13px"><a href="https://maps.google.com/?q=3141+Chestnut+Street&entry=gmail&source=g" target="_blank">3141 Chestnut Street</a></span><br style="font-size:12.8px"><span style="text-align:-webkit-auto;font-family:"times new roman",serif;font-size:13px">Stratton Hall Room 320</span><br style="font-size:12.8px"><span style="text-align:-webkit-auto;font-family:"times new roman",serif;font-size:13px">Philadelphia, PA 19104</span></div></div><br></div></div></div></div><span>
_______________________________________________<br>
Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" rel="noreferrer" target="_blank">http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br>
To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu" target="_blank">eeglablist-unsubscribe@sccn.ucsd.edu</a><br>
For digest mode, send an email with the subject "set digest mime" to <a href="mailto:eeglablist-request@sccn.ucsd.edu" target="_blank">eeglablist-request@sccn.ucsd.edu</a></span></blockquote></div><span class="m_3210736851365223949m_4775611883208047062m_6282254647934530271gmail-m_4873228945203488449HOEnZb"><font color="#888888"><br clear="all"><div><br></div>-- <br><div dir="ltr" class="m_3210736851365223949m_4775611883208047062m_6282254647934530271gmail-m_4873228945203488449m_2973762459533282885gmail_signature"><div dir="ltr">Makoto Miyakoshi<br>Swartz Center for Computational Neuroscience<br>Institute for Neural Computation, University of California San Diego<br></div></div>
</font></span></blockquote></div><br></div></div>
_______________________________________________<br>
Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" rel="noreferrer" target="_blank">http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br>
To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu" target="_blank">eeglablist-unsubscribe@sccn.ucsd.edu</a><br>
For digest mode, send an email with the subject "set digest mime" to <a href="mailto:eeglablist-request@sccn.ucsd.edu" target="_blank">eeglablist-request@sccn.ucsd.edu</a></blockquote></div>