[Eeglablist] Filter distortion around boundary events

Andreas Widmann widmann at uni-leipzig.de
Tue Jul 17 03:18:49 PDT 2018


Hi Brian,

this is indeed a prototypical filter edge artifact. Most commonly this type of artifact is observed with notch filters (but only because notch filters are most commonly applied for this type of interference) but can also be observed with low-pass or high-pass filters.

I'm afraid that you will not get completely rid of this problem. Your line noise interference is very strong (~1 mV peak-to-peak max on AF3 and ~500 µV peak-to-peak on average across channels). Filters need some time to achieve full attenuation. The problem can, however, be significantly reduced using somewhat different filter settings.

First, I would suggest to separate high-pass and low-pass filter. You may then use lower low-pass filter orders considerably reducing the temporal extent of the artifact. Further, I would suggest to use a lower low-pass cutoff frequency, e.g. 45 Hz (i.e., passband edge 40 Hz).
EEG = pop_eegfiltnew(EEG, 1,[],6600,0,[],1);
EEG = pop_eegfiltnew(EEG, [],40,660,0,[],1);

When filtering, the data have to be padded at the edges. We do pad with a DC constant to reliably avoid DC artifacts. With a harmonic oscillation in the data, padding with a constant implies amplitude modulation and amplitude modulation spectrally smears the line noise interference to adjacent bands at the edges of the signal. Therefore you have to use cutoff frequencies further away from the line noise interference frequency if the signal edges are important and cannot be cut away. Intuitively, mirror padding might might be an apparent solution to this problem. However, this will introduce other nice edge artifacts due to phase reset and DC shifts.

Usually, I would recommend to try other ways to remove the line noise interference, for example Cleanline or DFT filters. Not sure how Cleanline copes with the TMS artifacts, however. One more comment: The line noise interference is really strong, even for a recording in an unshielded environment. Might there possibly be a problem with common mode rejection in your EEG setup?

Hope this helps! Best,
Andreas

> Am 16.07.2018 um 20:48 schrieb Erickson <ericksonb.eng at gmail.com>:
> 
> Thanks for your responses.
> 
> Andreas, I used the "basic FIR filter" on automatic order calculation filtering from 1 to 55.
> 
> 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).
> https://drive.google.com/open?id=1KPlpeBCrCnQJHCJOcMYsnNSJVOjj0bTO
> 
> Then I plotted the data and cut out one section around a TMS event, and another section NOT around a TMS event;
> EEG = eeg_eegrej( EEG, [4615 5372;11482 12002]);
> [ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG, EEG, 1,'setname','with Rejections','gui','off'); 
> 
> filtered the data using the FIR filter from 1 to 55hz;
> EEG = pop_eegfiltnew(EEG, 1,55,6600,0,[],1);
> [ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG, EEG, 2,'setname','with Rejections and Filter','gui','off'); 
> 
> 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.
> 
> ​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.
> 
> 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?
> 
> Thanks to you both for considering the problem!
> 
> Brian
> 
> 
> On Thu, Jul 12, 2018 at 8:54 PM, Makoto Miyakoshi <mmiyakoshi at ucsd.edu> wrote:
> Dear Erickson
> 
> 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?
> 
> Makoto
> 
> On Thu, Jul 12, 2018 at 10:33 AM Erickson <ericksonb.eng at gmail.com> wrote:
> Hello EEGLAB list,
> 
> 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.
> 
> 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: https://drive.google.com/open?id=1yt6h_WLgI6jWAApVd52nwVLuiduYgXIH
> 
> 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).
> 
> 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! There is a lot of noise in the room but I'm not sure how that could create this specific issue.
> 
> Any perspectives on this issue are appreciated! Thank you,
> 
> Brian
> 
> Brian Erickson, Ph.D.
> Postdoctoral Researcher, CogNeW Lab
> 
> Drexel University
> 3141 Chestnut Street
> Stratton Hall Room 320
> Philadelphia, PA 19104
> 
> _______________________________________________
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.ucsd.edu
> For digest mode, send an email with the subject "set digest mime" to eeglablist-request at sccn.ucsd.edu
> 
> 
> -- 
> Makoto Miyakoshi
> Swartz Center for Computational Neuroscience
> Institute for Neural Computation, University of California San Diego
> 
> _______________________________________________
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.ucsd.edu
> For digest mode, send an email with the subject "set digest mime" to eeglablist-request at sccn.ucsd.edu




More information about the eeglablist mailing list