Reporting filters for publications

Hello,

I’m looking for help on best practices when reporting filters for publications and have some questions after having seen this doc advising to report

  1. Filter type (high-pass, low-pass, band-pass, band-stop, FIR, IIR)
  2. Cutoff frequency (including definition)
  3. Filter order (or length)
  4. Roll-off or transition bandwidth
  5. Passband ripple and stopband attenuation
  6. Filter delay (zero-phase, linear-phase, non-linear phase) and causality
  7. Direction of computation (one-pass forward/reverse, or two-pass forward and reverse)

In our case, we are filtering our signals using these two functions

A) raw.plot(theme="light", highpass=1.0, lowpass=40.0, block=True)

Setting up band-pass filter from 1 - 40 Hz

IIR filter parameters
---------------------
Butterworth bandpass zero-phase (two-pass forward and reverse) non-causal filter:
- Filter order 16 (effective, after forward-backward)
- Cutoffs at 1.00, 40.00 Hz: -6.02, -6.02 dB

B) All other filters follow this format

    raw1.filter(
        l_freq=1.0,
        h_freq=40.0,
        picks="eeg",
        method="fir",
        phase="zero-double",
        fir_window="hamming",
        fir_design="firwin",
        pad="edge",
    )
Filtering raw data in 1 contiguous segment
Setting up band-pass filter from 1 - 40 Hz

FIR filter parameters
---------------------
Designing a two-pass forward and reverse, zero-phase, non-causal bandpass filter:
- Windowed time-domain design (firwin) method
- Hamming window with 0.0194 passband ripple and 53 dB stopband attenuation
- Lower passband edge: 1.00
- Lower transition bandwidth: 1.00 Hz (-12 dB cutoff frequency: 0.50 Hz)
- Upper passband edge: 40.00 Hz
- Upper transition bandwidth: 10.00 Hz (-12 dB cutoff frequency: 45.00 Hz)
- Filter length: 3381 samples (3.302 s)

My questions:

  1. with raw.plot(), regarding the order:

On one hand, this output “Filter order 16 (effective)

On the other hand, from the doc of mne.io.Raw.plot(), I see:

filtorder=4

Filtering order. 0 will use FIR filtering with MNE defaults. Other values will construct an IIR filter of the given order and apply it with filtfilt()

Should I be reporting one over the other (is it 4 or 16?) or both?
Something like:

  • Filter order 4 (order 16 (effective, after forward-backward))
  • Cutoffs at 1.00, 40.00 Hz
  1. next, with an IIR, I’m not sure what to report for:
  • Roll-off or transition bandwidth
  • Passband ripple and stopband attenuation

When using raw.filter as a FIR filter, I can see the output for passband ripple & stopband attenuation and transition bandwidth, though that’s not the case wih raw.plot() with an IIR filter.

Going back up the source, I see that raw.plot() leads up to create_filter()

and l_trans_bandwidth and h_trans_bandwidth have a note saying:

Only used for method=‘fir’.

Does it mean this info is not applicable to IIR, and there is no need to report something here?
If it is, how can I extract the information from our code? Or can I assume it is similar to FIR, and we can just follow this table

Many thanks!

Best
Arthur

@larsoner Could you have a look at this question?

For raw.plot the filter is only used for visualization, it does not affect the data in raw. So I doubt it’s what you should supply for a publication. It does seem like a bug that the default order is 4 but it says 16, seems like it should say 8. Feel free to open a GitHub issue about this.

For publication you’d want to report how you actually filter the data for analysis, which would be the raw.filter FIR parameters. Sounds like you have what you need for that!

Thank you!

The reasoning behind reporting the first filter for viz was to give a more complete recipe on how we did annotations.
I do agree that the main info is for the filter for analysis though, that makes sense!

thanks

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.