[Mne_analysis] Low pass filtering questions

Hari Bharadwaj hari at nmr.mgh.harvard.edu
Thu Mar 14 14:08:34 EDT 2013
Search archives:

Hi Don, Alex and Matti,
    Not to introduce any more confusion but I have a clarification question:
Which of the following is true about the C-code?
(1) The filter is realized in the frequency domain fully (i.e) the FFT
coefficients for blocks of 2048 time samples are tapered to have a
transition band of 5 Hz around the cutoff and then going back to time. In
this case, the filter is a non-causal IIR filter with zero-group delay.

(2) An FIR filter is designed first and then then implemented in the
frequency domain using the overlap-add method with FFT blocks of 2048
points each. In this case, the filter is FIR and non-causal with
zero-group delay but there are (small) sidebands extending upto the
Nyquist rate. This would be like MATLAB's fftfilt().

Thanks,
Hari


On Thu, March 14, 2013 8:45 am, Matti Hamalainen wrote:
>
> On Mar 14, 2013, at 8:30 AM, Alexandre Gramfort wrote:
>
>> hi Don,
>>
>>> Please bear with a further question:
>>> If the low-pass is set at 40 Hz, then the cos^2 drop off is applied
>>> beginning at the 40 hz components and falling to zero at 45 ?  Or is it
>>> applied beginning at something like 38 hz so that the fourier
>>> coefficients are attenuated by a fact of 2 at 40 ?
>>
>> I am not 100% about the C code but I bet for 40 to 45 with 0 at 45 Hz
>>
>>> And pardon this stupid question: Does this produce a gain of 0.0 for
>>> all higher frequencies in the filtered signal above 45?  Or is there
>>> some kind of ringing which occurs?
>>
>> it does remove all frequencies about 45Hz up to some numerical errors
>> and if there is some ringing it will be in time. The less the stop
>> band (here 5) the more ringing in time domain.
>
> Hi Don,
>
> In the C code the default width of the lowpass transition is 5 Hz. For 40
> Hz lowpass this means that the falloff starts at 37.5 Hz and ends at 42.5
> Hz. You can adjust this value in the mne_browse_raw or with the --lowpassw
> option in mne_process_raw and mne_browse_raw.
>
> The manual tells this in sections 4.5.1 and 4.2.1.
>
> - Matti
>
>
>
>
> ---------
>
> Matti Hamalainen, Ph.D.
> Athinoula A. Martinos Center for Biomedical Imaging
> Massachusetts General Hospital
>
> msh at nmr.mgh.harvard.edu
> mhamalainen at partners.org
>
>
>
>
>
>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis


-- 
Hari Bharadwaj
PhD Candidate, Biomedical Engineering,
Boston University
677 Beacon St.,
Boston, MA 02215

Martinos Center for Biomedical Imaging,
Massachusetts General Hospital
149 Thirteenth Street,
Charlestown, MA 02129

hari at nmr.mgh.harvard.edu
Ph: 734-883-5954





More information about the Mne_analysis mailing list