remove_confounds¶
- remove_confounds(timeseries, confounds, confound_selection=None, confound_regex=False, regex_print_selected=False, clean_params=None)[source]¶
Removes specified confounds using nilearn.signal.clean
- Parameters:
timeseries (array or dataframe) – input timeseries with dimensions: (node,time)
confounds (array or dataframe) – List of confounds. Expected format is (confound, time). If using TenetoBIDS, this does not need to be specified.
confound_selection (list) – List of confounds. If None, all confounds are removed
confund_regex (bool) – If True, confound_selection can contain regex expressions
regex_print_selected (bool) – If True, print the selected confounds after regex, this ensures correct columns are chosen
clean_params (dict) – Dictionary of kawgs to pass to nilearn.signal.clean
- Return type:
Says all TenetBIDS.get_selected_files with confounds removed with _rmconfounds at the end.
Note
There may be some issues regarding loading non-cleaned data through the TenetoBIDS functions instead of the cleaned data. This depeneds on when you clean the data.