SIMEXP / load_confounds

Load fMRIprep confounds in python
MIT License
36 stars 12 forks source link

how to check the number of scrubbed volumes? #152

Closed GerardYu closed 2 years ago

GerardYu commented 3 years ago

is it possible to check the number of scrubbed or remaining volumes?

htwangtw commented 3 years ago

Yes, for the most up-to-date version on the main branch, you can get the total number of remaining volumes this way:

from load_confounds import Confounds
confounds, sample_masks = Confounds(strategy=['high_pass', 'motion', 'global', 'scrub']).load(file)
print(len(sample_masks))

However, I would like to redirect you to the developing version implemented on nilearn main branch.

To use the developing version of nilearn:

pip install git+https://github.com/nilearn/nilearn.git

Once the developing version is released as a stable version, you can install it the normal way on their documentation.