The outputs are not highpass filtered. The CompCor decompositions are performed on a highpass filtered version of the data, so CompCor components should only be used in addition to the cosine regressors.
Thanks @effigies. I intend to bandpass filter the *_desc-preproc_bold.nii.gz data, so that file should not be highpass filtered right?
By the way, why is highpass filtering employed before running CompCor?
It is not filtered. If you’re asking about the consequences of double-filtering, they’re probably not severe, as long as your second pass-band lies within the first and the overall properties of the two filters are similar, but I agree that it’s better not to.
@effigies, can I follow up on this thread because I’m still confused if I should do high-pass filtering or not?
I would like to include the CompCor regressors for denoising and I’m aware I should also include cosine regressors. My question is, is adding the CompCor and cosine regressors from fmriprep equivalent to denoising using my own CompCor regressors (calculated using nonfiltered data) and high-pass filtering in the same GLM (for example with 3dTproject)?
Thanks @effigies. Then let’s say I use fmriprep’s CompCor regressors as well as cosine regressors in denoising. Will linear drift and other low-frequency noise be removed from the output of my denoising by adding the cosine regressors? Or will I need to perform high-pass filtering in addition if I would like to remove those low-frequencies?
hi @effigies. a related question to this thread.
I want to include CompCor in my models but am using SPM which already includes cosines as a part of the model by default. I can see 2 reasonable options of how to do that:
Take the fmriprep cosine and ask SPM not to perform HPF
Match the SPM harmonics to those used by fmriprep (or make sure they have a lower cutoff frequency).
For both solutions it will be helpful to know what frequency is used by fmriprep.
We use a 128s cutoff. I think this is (or was) the SPM default at one point, so it probably makes very little difference (cosines are pretty well defined). If you have non-steady-state volumes, you’ll need to account for that. Using the fMRIPrep regressors includes this already.
Thanks @effigies. One related question, I noticed that running cosine_drift function outside fmriprep will create more regressors than those included in the confounds file generated by fmriprep.
How does fmriprep come up with the final number of cosine_XX regressors that are included in the tsv confounds file?
thanks @effigies. However, this function returns a 450x450 array whereas the fmriprep confounds tsv file only contains a few cosine_XX columns. My question is rather how does fmriprep decide how many columns to extract from that 450x450 array.
In : import numpy as np
In : from nipype.algorithms.confounds import _cosine_drift
In : period_cut = 128
In : frametimes = np.arange(450) * 2.0
In : cdrift = _cosine_drift(period_cut, frametimes)
In : cdrift.shape
Out: (450, 14)