Hi everyone,
I am using fmriprep to preprocess rsfmri data. I have some questions regarding the confound regressors given in confounds.csv file and how to use the use them, and was hoping someone can clarify these.
 I am planning to use the cosine regressors in the confounds file to highpass filter the data (i.e., use these along with the other confound regressors I am using to denoise my data). Are these cosine regressors computed in the same way as shown in this tutorial, using the nilearn.glm.first_level.design_matrix ? When I use nilearn, I get 4 cosine regressors with
from nilearn.glm.first_level.design_matrix import _cosine_drift as discrete_cosine_transform
dc_set = discrete_cosine_transform(high_pass=0.0078, frame_times=frame_times)
where frame_times set as frame_times = np.linspace(0, 320, 400, endpoint=False)
since for my data I have a TR=0.8 sec, n_volumes=400, making the task duration 320 seconds. high_pass was set as 0.0078 for one cycle in 128 seconds.
However in the fmriprep confounds.csv, there are 3 cosine regressors, which I am guessing due to having nonsteady outlier volumes. I did not opt in for fd or dvarsspikethreshold options, yet I seemed to have outliers in the outputted confound file. Is there a way to opt out from having nonsteady outliers calculated? If not, would using the nilearn computed cosine regressors be the same?

As detailed in the fmriprep paper, the aCompcor components were calculated using the union of CSF and WM masks in T1 space, after their projection to the native space of functional images. Does this also apply to the global signals extracted within WM and CSF masks, as in they were also projected back to the functional space after being extracted within native T1?

I understand that aCompcor regressors were derived from the high pass filtered functional data, therefore the cosine regressors should be included in the confounds file before denoising functional data (to have the denoised data highpass filtered as well)
If a highpass filter is already being implemented for the functional data ( e.g., in FSL), canâ€™t we just exclude the cosines but still use the acompcor regressors for the confound regression?
 This is unrelated to the above and just to confirm that in the derivatives/func folder sub001_taskrest_descpreproc_bold.nii.gz would correspond to the reliagned (i.e., motion corrected) functional data, not to the realigned functional data aligned to T1w space?
For output spaces I used outputspaces MNI152NLin6Asym:res1 func \ and opt out from the SyN distortion correction.
Thank you in advance!