Open TrevorKMDay opened 2 months ago
Thanks!
Just to state: fMRIPrep doesn't produce the "correct" number of cosine regressors, it produces those needed for a 128s high-pass cutoff. You are free to use less (or more, if you calculate them yourself).
That said, from https://fmriprep.org/en/stable/outputs.html:
fMRIPrep does high-pass filtering before running anatomical or temporal CompCor. Therefore, when using CompCor regressors, the corresponding cosine_XX regressors should also be included in the design matrix.
Here the point is that you should use all of the cosine regressors if you're going to use CompCor.
If this is unclear, could you propose clearer wording that would you feel would have gotten the point across better?
Ah thanks for the note and quick reply.
I think it would be useful to include something like "it produces those needed for a 128s high-pass cutoff, based on the length of the scan ... One characteristic of the cosine regressors is that they are identical for two different datasets with the same TR ..."
Therefore when using CompCor regressors, [all of] the cosine_XX regressors should be included ...
I suppose I got a little turned around because the other regressors contain a lot of information about how many to select, but with cosine_XX
, you just use them all. Does that make sense? "Corresponding" to me isn't very clear, it sounds like if you used the first 10 CompCor regressors, you'd only use the first cosine, and then with 20, you'd use the first two or something.
Would you feel up for opening a PR against the documentation?
Sure, I can next week
On Thu, Sep 5, 2024 at 11:56 AM Chris Markiewicz @.***> wrote:
Would you feel up for opening a PR against the documentation?
— Reply to this email directly, view it on GitHub https://github.com/nipreps/fmriprep/issues/3351#issuecomment-2332103548, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADGMXGFBUS2OEFTKZTEWJCTZVB5LZAVCNFSM6AAAAABM6L43X6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZSGEYDGNJUHA . You are receiving this because you authored the thread.Message ID: @.***>
-- Trevor
It's my understanding the number of
cosine_
regressors are based on the length of the scan. However, I thought they behaved like the aCompCor regressors, i.e. more than you need are calculated. I spent some time looking for how many to select based on the length of the scan, before finding out fMRIPREP makes that calculation for you and spits out exactly the correct number ofcosine_
regressors.I think the documentation could be more explicit about the number of cosine regressors and how fMRIPREP selects them for you.