[Mne_analysis] jump artifacts after filtering

Moorselaar, D. van d.van.moorselaar at vu.nl
Wed Nov 11 09:27:46 EST 2015
Search archives:

Thank you for the quick response. I was running version 0.9. I have updated now to version 0.10 and the jump artifacts are indeed no longer present.
There appears to be a offset shift though between matlab and mne filter (Matlab being consistently more negative), but I will look into this.
Thank you very much.

Best,

Dirk


On Nov 11, 2015, at 12:17 PM, Eric Larson <larson.eric.d at gmail.com<mailto:larson.eric.d at gmail.com>> wrote:


Which version are you running? There was a bug some months ago that produced some jump artifacts, but it has been fixed in 0.10 (latest release) and master.

Eric

On Nov 11, 2015 6:01 AM, "Moorselaar, D. van" <d.van.moorselaar at vu.nl<mailto:d.van.moorselaar at vu.nl>> wrote:
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).

<filter_artifact.png>
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

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu<mailto:Mne_analysis at nmr.mgh.harvard.edu>
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu<mailto:Mne_analysis at nmr.mgh.harvard.edu>
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20151111/066062ab/attachment.html 


More information about the Mne_analysis mailing list