How to set band-pass filter using fmriprep

In papers that I’ve read, they do bandpass filtering with fMRI images between 0.01–0.08 Hz in some cases and 0.01-0.1 Hz in others.

Does fmriprep support set the value of the filter? Which code should be used when using fmriprep-docker?

Or fMRI images are filtered by other software at first and then the getting results are preprocessed by fmriprep-docker?

Thank you very much.

1 Like

fmriprep does only produce “minimally preprocessed” outputs.

It is up to the user to load a sensible subset of confounds generated by fmriprep and apply them.
fmriprep does generate a basis of discrete cosines that can be used for high pass filtering, but I don’t think it has the basis for the low pass filtering.
However this is easy to implement with nilearn's NiftiMasker. You just to be careful how you include your confounds in the masker.

You can check the documentation of the load_confounds package for more info: GitHub - SIMEXP/load_confounds: Load fMRIprep confounds in python (in particular the section " A note on low pass filtering").


Just to add on to @pbellec’s helpful response: filtering, along with other denoising steps like nuisance regression, are typically the last preprocessing steps you do. That means a standard pipeline (e.g. for functional connectivity) may be something like fMRIPrep → quality control (e.g. exclude if too much motion or poor spatial normalization) → spatial smoothing (several software packages like SPM and Nilearn implement this) → denosing (filtering, nuisance regression, volume censoring etc.) → 1st and 2nd level analyses.

fMRIPrep will get you through the first two steps, since you can use the HTML outputs of fMRIPrep and the confounds file to check for poor spatial normalization and motion outliers, respectively.


Thanks for your response:smile: