xcp_d.utils.confounds.load_confound_matrix
- xcp_d.utils.confounds.load_confound_matrix(params, img_file, confounds_file, confounds_json_file, custom_confounds=None)[source]
Load a subset of the confounds associated with a given file.
- Parameters:
params ({“36P”, “24P”, “27P”, “acompcor”, “acompcor_gsr”, “aroma”, “aroma_gsr”, “custom”}, optional) – Shorthand for the parameter set to extract from the confounds TSV. Default is “36P”, most expansive option.
img_file (
str) – The path to the bold file. Used to load the AROMA mixing matrix, if necessary.confounds_file (
str) – The fMRIPrep confounds file. Used to load most confounds.confounds_json_file (
str) – The JSON file associated with the fMRIPrep confounds file.custom_confounds (
stror None, optional) – Custom confounds TSV if there is one. Default is None.
- Returns:
confounds_df (
pandas.DataFrameor None) – The loaded and selected confounds. If “AROMA” is requested, then this DataFrame will include signal components as well. These will be named something like “signal_[XX]”. Ifparamsis “none”,confounds_dfwill be None.confounds_metadata (
dict) – Metadata for the columns in the confounds file.