FIR filter order

Hi,
I’m working on Windows 10 with Python 3.9 and MNE 0.24.1. I’m working on fNIRS signals and trying to filter it using a Bandpass FIR filter order 1000 with the following cut off frequency [0.01, 0.09]. I don’t know how to specify the filter order. Here is a part of my code :

OD=mne.preprocessing.nirs.optical_density(rawData)
Conc=mne.preprocessing.nirs.beer_lambert_law(OD,ppf=6)
FilteredData=Conc.copy().filter(0.01, 0.09, l_trans_bandwidth=0.005,h_trans_bandwidth=0.005, method='fir')

Thanks !
Nolwenn

You want the filter_length parameter:

https://mne.tools/stable/generated/mne.io.Raw.html#mne.io.Raw.filter

Thanks for your answer, I’ve looked at the filter_length parameter but I don’t know how to use it. To have a 1000th order filter what specification should I use for the filter_length parameter ?

Quoting Filter order vs number of taps vs number of coefficients - Signal Processing Stack Exchange :

The order of an FIR filter is filter length minus 1

So if you want an order-1000 FIR filter, you want filter_length=1001 (int)