xcp_d.interfaces.censoring.GenerateConfounds
- class xcp_d.interfaces.censoring.GenerateConfounds(from_file=None, resource_monitor=None, **inputs)[source]
Load, consolidate, and filter confounds.
Also, generate the temporal mask.
- Mandatory Inputs:
TR (a float) – Repetition time in seconds.
band_stop_max (a float or None) – Upper frequency for the band-stop motion filter, in breaths-per-minute (bpm).
band_stop_min (a float or None) – Lower frequency for the band-stop motion filter, in breaths-per-minute (bpm).
custom_confounds_file (a pathlike object or string representing an existing file or None) – Custom confounds tsv.
fmriprep_confounds_file (a pathlike object or string representing an existing file) – FMRIPrep confounds tsv.
fmriprep_confounds_json (a pathlike object or string representing an existing file) – FMRIPrep confounds json.
in_file (a pathlike object or string representing an existing file) – BOLD file after denoising, interpolation, and filtering.
motion_filter_order (an integer or None)
motion_filter_type (a string or None)
params (a string) – Parameter set for regression.
- Optional Inputs:
fd_thresh (a float) – Framewise displacement threshold. All values above this will be dropped.
head_radius (a float) – Head radius in mm .
- Outputs:
confounds_file (a pathlike object or string representing an existing file or None) – The selected confounds. This may include custom confounds as well. It will also always have the linear trend and a constant column.
confounds_metadata (a dictionary with keys which are any value and with values which are any value) – Metadata associated with the confounds_file output.
filtered_confounds_file (a pathlike object or string representing an existing file) – The original fMRIPrep confounds, with the motion parameters and their Volterra expansion regressors replaced with filtered versions.
motion_file (a pathlike object or string representing an existing file) – The filtered motion parameters.
motion_metadata (a dictionary with keys which are any value and with values which are any value) – Metadata associated with the filtered_motion output.
temporal_mask (a pathlike object or string representing an existing file) – Temporal mask; all values above fd_thresh set to 1. This is a TSV file with one column: ‘framewise_displacement’.
temporal_mask_metadata (a dictionary with keys which are any value and with values which are any value) – Metadata associated with the temporal_mask output.
- __init__(from_file=None, resource_monitor=None, **inputs)[source]
Subclasses must implement __init__
Methods
__init__([from_file, resource_monitor])Subclasses must implement __init__
aggregate_outputs([runtime, needed_outputs])Collate expected outputs and apply output traits validation.
help([returnhelp])Prints class help
load_inputs_from_json(json_file[, overwrite])A convenient way to load pre-set inputs from a JSON file.
run([cwd, ignore_exception])Execute this interface.
save_inputs_to_json(json_file)A convenient way to save current inputs to a JSON file.
Attributes
always_runShould the interface be always run even if the inputs were not changed? Only applies to interfaces being run within a workflow context.
can_resumeDefines if the interface can reuse partial results after interruption.
resource_monitorversioninterfaces should implement a version property