@@ -543,7 +543,7 @@ def _process_masks(self, mask_images, timeseries=None):
543
543
for i , img in enumerate (mask_images ):
544
544
mask = img .get_data ().astype (np .bool )
545
545
imgseries = timeseries [mask , :]
546
- imgseries = regress_poly (2 , imgseries )
546
+ imgseries = regress_poly (2 , imgseries )[ 0 ]
547
547
tSTD = _compute_tSTD (imgseries , 0 , axis = - 1 )
548
548
threshold_std = np .percentile (tSTD , np .round (100. *
549
549
(1. - self .inputs .percentile_threshold )).astype (int ))
@@ -618,7 +618,7 @@ def _run_interface(self, runtime):
618
618
data = data .astype (np .float32 )
619
619
620
620
if isdefined (self .inputs .regress_poly ):
621
- data = regress_poly (self .inputs .regress_poly , data , remove_mean = False )
621
+ data = regress_poly (self .inputs .regress_poly , data , remove_mean = False )[ 0 ]
622
622
img = nb .Nifti1Image (data , img .affine , header )
623
623
nb .save (img , op .abspath (self .inputs .detrended_file ))
624
624
@@ -734,9 +734,10 @@ def compute_dvars(in_file, in_mask, remove_zerovariance=False,
734
734
func_sd = func_sd [func_sd != 0 ]
735
735
736
736
# Compute (non-robust) estimate of lag-1 autocorrelation
737
- ar1 = np .apply_along_axis (AR_est_YW , 1 ,
738
- regress_poly (0 , mfunc , remove_mean = True ).astype (
739
- np .float32 ), 1 )[:, 0 ]
737
+ ar1 = np .apply_along_axis (
738
+ AR_est_YW , 1 ,
739
+ regress_poly (0 , mfunc , remove_mean = True )[0 ].astype (np .float32 ),
740
+ 1 )[:, 0 ]
740
741
741
742
# Compute (predicted) standard deviation of temporal difference time series
742
743
diff_sdhat = np .squeeze (np .sqrt (((1 - ar1 ) * 2 ).tolist ())) * func_sd
0 commit comments