[Mne_analysis] jump artifacts after filtering

Moorselaar, D. van d.van.moorselaar at vu.nl
Wed Nov 11 06:01:33 EST 2015
Search archives:

Hi all,

At the moment I am working on a project in which I am comparing a semi-automatic preprocessing procedure in Matlab (using EEGlab and Fieldtrip toolboxes) to preprocessing in python using MNE (github.com/dvanmoorselaar/eeg_analysis<http://github.com/dvanmoorselaar/eeg_analysis>; still in development). I am able to exactly replicate the results from the Matlab pipeline, potentially allowing us to move all our eeg analyses to mne/python.
There is one problem however. While comparing the output in Matlab to that in python per preprocessing step I noticed some weird jump artifacts after applying a 0.5 high pass filter to the data:

session.filter(l_freq = 0.5, h_freq = None, filter_length = 3073, l_trans_bandwidth = 0.15)

As visualized below (Matlab in red, Python in green), after referencing the data are perfectly aligned (top figures). However, after applying a 0.5 high pass filter with the settings specified above (default Matlab settings), the data now all of a sudden contain jump artifacts. These artifacts are present at random intervals throughout the whole time series and in all channels. At first I thought this might have something to do with the chosen filter length (MNE give a warning that filter length should be increased), however when I increased the filter length three times these artifacts were still present (bottom right) in the data, although less frequent and at different time points).

[cid:05AE8DCA-D1A5-4AB4-BA6D-72A3B97E939D]
Also, I noticed that similar jump artifacts were present when applying a 0.5 low pass filter instead of a high pass filter, potentially indicating that something is off in the numpy fft convolution.  At first sight there appeared nothing wrong with the power spectra of these filters.

Is this a known problem or am I doing completely incorrect?

Best,

Dirk van Moorselaar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20151111/224fc92a/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: filter_artifact.png
Type: image/png
Size: 67423 bytes
Desc: filter_artifact.png
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20151111/224fc92a/attachment-0001.png 


More information about the Mne_analysis mailing list