Filter settings

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

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

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

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

Eric