xcp_d.utils.confounds.get_custom_confounds

xcp_d.utils.confounds.get_custom_confounds(custom_confounds_folder, fmriprep_confounds_file)[source]

Identify a custom confounds file.

Parameters:
  • custom_confounds_folder (str or None) – Path to folder containing custom nuisance regressors. Must be a folder containing confounds files, in which case the file with the name matching the preprocessing confounds file will be selected.

  • fmriprep_confounds_file (str) – Confounds TSV file from preprocessing derivatives. We expect the custom confounds file to have the same name.

Returns:

custom_confounds_file – Path to custom nuisance regressors.

Return type:

str or None