tedana icon indicating copy to clipboard operation
tedana copied to clipboard

using --dummy-scans fails when used together with --external regressors

Open miltoncamacho opened this issue 2 weeks ago • 1 comments

Summary

Tedana seems to load the data minding the dummy-scans

https://github.com/ME-ICA/tedana/blob/39cd09986c8b61324f595e8c7320bf04098f502d/tedana/workflows/tedana.py#L631

But a few lines later it calls the load_validate_external _regressors

https://github.com/ME-ICA/tedana/blob/39cd09986c8b61324f595e8c7320bf04098f502d/tedana/workflows/tedana.py#L633C1-L648C1

Which then tries to verify that the files are the same size as the volumes - dummy-scans which were already removed, right?

https://github.com/ME-ICA/tedana/blob/39cd09986c8b61324f595e8c7320bf04098f502d/tedana/metrics/external.py#L221C1-L236C1

Giving you an error:

tedana.metrics.external.RegressError: External regressors have 145 timepoints while fMRI data have 137 timepoints, of which 8 are dummy scans.

Simple solution: remove the additional removal of the dummy-scans when evaluating

miltoncamacho avatar Dec 12 '25 20:12 miltoncamacho

I just came here to open this exact issue! I will work on fixing ASAP.

tsalo avatar Dec 12 '25 20:12 tsalo