[Mne_analysis] Equivalent of eeglab's eegfilt() in mne

Brunner, Clemens (clemens.brunner@uni-graz.at) clemens.brunner at uni-graz.at
Thu Jan 18 02:55:27 EST 2018
Search archives:

It is worth mentioning that pop_eegfilt (and the related eegfilt) is deprecated and not recommended anymore. It has been replaced with pop_eegfiltnew, which implements Hamming windowed sinc FIR filters. This is also available in MNE, and in fact the default filter settings in the latest MNE release are in line with the recommended EEGLAB settings. The only thing you should manually change in 0.15 is fir_design='firwin' - 0.16 will use this as default. This settings produces much steeper filters than 'firwin2' (default in 0.15) or the MATLAB 'firls' method.

Note that phase='zero' only filters once, but compensates the FIR delay by shifting the output back, so you will have a zero-phase filter. This is also the default setting in EEGLAB's pop_eegfiltnew, and I don't recommend 'zero-double', because this applies the filter twice, so the specs you define with the arguments are actually doubled.

Clemens



> On Jan 17, 2018, at 16:19, Eric Larson <larson.eric.d at gmail.com> wrote:
> 
> In Python we only support window-based FIR design, not least squares. However, you could use SciPy's `firls` with `lfilter` or `flitfilt` directly.
> 
> Best,
> Eric
> 
> 
> On Wed, Jan 17, 2018 at 10:05 AM, Servant Mathieu <servant.mathieu at gmail.com> wrote:
> Hi community,
> 
> Is there a direct equivalent of eeglab's eegfilt() function (see below) in mne? I think that mne.filter.filter_data(data, srate, l_freq, h_freq) does something similar when phase='zero-double'. Could you confirm? 
> Best,
> Mat
> 
> 
> % eegfilt() -  (high|low|band)-pass filter data using two-way least-squares 
> %              FIR filtering. Optionally uses the window method instead of 
> %              least-squares. Multiple data channels and epochs supported.
> %              Requires the MATLAB Signal Processing Toolbox.
> % Usage:
> %  >> [smoothdata] = eegfilt(data,srate,locutoff,hicutoff);
> 
> _______________________________________________
> Mne_analysis mailing list
> 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
> 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.




More information about the Mne_analysis mailing list