Skip to content

Commit 7fdc70d

Browse files
committed
Remove constant column from motion regressor
Remove constant column in the motion regressor, caused singular matrix during GLM.
1 parent 6601b00 commit 7fdc70d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/rsfmri_vol_surface_preprocessing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ def build_filter1(motion_params, comp_norm, outliers, detrend_poly=None):
230230
out_params = np.hstack((out_params, outlier_vector))
231231
if detrend_poly:
232232
timepoints = out_params.shape[0]
233-
X = np.ones((timepoints, 1))
233+
X = np.empty((timepoints, 0))
234234
for i in range(detrend_poly):
235235
X = np.hstack((X, legendre(
236236
i + 1)(np.linspace(-1, 1, timepoints))[:, None]))

0 commit comments

Comments
 (0)