Skip to content

Commit d3f8b26

Browse files
authored
Fix orthaggr confound bug (#59)
1 parent e1b6819 commit d3f8b26

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/fmripost_aroma/interfaces/confounds.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,9 @@ def _get_ica_confounds(mixing, aroma_features, skip_vols, newpath=None):
9999
# Select the mixing matrix rows corresponding to the motion ICs
100100
aggr_mixing_arr = mixing_arr[motion_ics, :].T
101101

102+
# Regress the good components out of the bad time series to get "pure evil" regressors
102103
signal_mixing_arr = mixing_arr[signal_ics, :].T
103104
orthaggr_mixing_arr = aggr_mixing_arr.copy()
104-
orthaggr_mixing_arr = aggr_mixing_arr - np.dot(
105-
np.dot(np.linalg.pinv(good_ic_arr), good_ic_arr), aggr_mixing_arr
106-
)
107-
# Regress the good components out of the bad time series to get "pure evil" regressors
108105
aggr_mixing_arr_z = stats.zscore(aggr_mixing_arr, axis=0)
109106
signal_mixing_arr_z = stats.zscore(signal_mixing_arr, axis=0)
110107
betas = np.linalg.lstsq(signal_mixing_arr_z, aggr_mixing_arr_z, rcond=None)[0]

0 commit comments

Comments
 (0)