compCorr masks from fmriprep

Hi There,

Is there a way to find the final masks used for compCorr calculation?
My guess is that there should be a main anatomical mask and transformed masks corresponding to the different functional runs.


Right now we don’t output them. It probably would not be a bad idea to do so.


Just to add a little context.
If I’m reading the code correctly, currently compCor excludes non-steady states from the beginning of the run and then uses a cosine HPF before running the PCA.
My worry is that mid-scan motion artifacts that can have big spike on global signal are being kept and even if those are later scrubbed, the temporal filter will spread those in time and into the compCor components.
Do you think that the current outputs provide enough to repeat the compCor calculation with the resulting preprocessed bold series? The missing piece for me is the anat to func transormation(s).

Any thoughts about this? Is this a worry for fmriprep in genenral?

I’m not sure this would happen. The filtering performed before estimating compCor is high-pass filtering - in other words it removes slow drifts. I am not sure how this could lead to “spreading spikes in time”. Maybe if you could provide some simulation of such effect it would be easier to understand.

I was thinking about the point made by Carp (2011, comment on Power). He actually used a BPF not HPF in the simulations so I guess that can make a big difference. A spike is a sharp transition (high frequency) so will definitely stay in data, but maybe it won’t be spread? Guess I might need some simulation to think this through…