# Filter settings

**URL:** <https://mne.discourse.group/t/filter-settings/1840>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [May 8, 2019, 3:14pm UTC](https://mne.discourse.group/t/filter-settings/1840 "2019-05-08T15:14:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [May 8, 2019, 3:14pm UTC](https://mne.discourse.group/t/filter-settings/1840/1 "2019-05-08T15:14:31Z")

</div>

External Email - Use Caution

Dear,

For a time-frequency analysis I have used the following settings:

x\_hilb = hilbert(filter\_data(x, 512,8, 12, method = 'iir', iir\_params = dict(ftype = 'butterworth', order = 5)))

A question by the reviewer now is how this filter affected the temporal resolution of the eeg signal. My understanding of filtering is very basic, but I believe in addition to the order of the filter this is largely determined by both the frequency band of interest and the transition bandwiths. Is this correct, and if so how can I retrieve these bandwiths as I did not specify them myself. If not, are there any other parameters that I should report in the methods section in addition to the filter order.

Thanks in advance,

Dirk

-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20190508/7fd9fa3a/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20190508/7fd9fa3a/attachment.html)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [May 8, 2019, 3:44pm UTC](https://mne.discourse.group/t/filter-settings/1840/2 "2019-05-08T15:44:03Z")

</div>

External Email - Use Caution

> A question by the reviewer now is how this filter affected the temporal  
> resolution of the eeg signal. My understanding of filtering is very basic,  
> but I believe in addition to the order of the filter this is largely  
> determined by both the frequency band of interest and the transition  
> bandwiths.

The idea of a transition band (which separates the pass-band and stop-band)  
is only used for FIR filtering in MNE. IIR filters can be defined /  
reproduced just by specifying the filter type (low-pass, high-pass,  
band-pass, or band-stop), cutoff frequency(ies), order, and topology  
(Bessel, Butterworth, Chebychev w/params, etc.). For you this could write  
something like "we used a 5th order Butterworth band-pass filter with  
cutoff frequencies of 8 and 12 Hz".

Regarding the resulting temporal resolution, this will relate to both your  
filter characteristics / fall-off, and the width of your pass-band (here, 4  
Hz). The more narrow the pass-band and sharper the filter falloff, the  
worse the resulting temporal resolution will be (and the broader the  
pass-band and shallower the filter slope, the better the resulting temporal  
resolution will be).

As to how best characterize these things for your reviewer, I'm not sure  
offhand. I can recommend these two articles as likely places where  
best-practices for reporting could give some hints:

[https://www.sciencedirect.com/science/article/pii/S0165027014002866?via%3Dihub](https://www.sciencedirect.com/science/article/pii/S0165027014002866?via%3Dihub)  
[https://www.cell.com/neuron/fulltext/S0896-6273(19)30174-6](https://www.cell.com/neuron/fulltext/S0896-6273(19)30174-6)

Let us know if you find something useful in them!

Eric  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20190508/c18cb590/attachment-0001.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20190508/c18cb590/attachment-0001.html)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [May 9, 2019, 12:32pm UTC](https://mne.discourse.group/t/filter-settings/1840/3 "2019-05-09T12:32:45Z")

</div>

External Email - Use Caution

... and I forgot to mention (thanks Burkhard!) that MNE does a  
forward-backward application of the filter. So the order of the filter is  
effectively doubled, and the (-3 dB) cutoff frequencies are modified  
slightly.

You can get the impulse response of the filter by doing something like:

signal = np.zeros(10001)  
signal[5000] = 1  
resp = mne.filter.filter\_data(signal, info['sfreq'], 8, 12, ...)

This is the sort of thing done in the filtering tutorial:

[https://martinos.org/mne/stable/auto\_tutorials/plot\_background\_filtering.html#iir-filters](https://martinos.org/mne/stable/auto_tutorials/plot_background_filtering.html#iir-filters)

Or you can use the `plot_filter` function to do some of this for you:

[https://martinos.org/mne/stable/generated/mne.viz.plot\_filter.html#mne.viz.plot\_filter](https://martinos.org/mne/stable/generated/mne.viz.plot_filter.html#mne.viz.plot_filter)

Eric
