Skip to content

Commit c15de34

Browse files
author
Shoshana Berleant
committed
fixed TCompCor (bug found while refactoring)
1 parent 8b6d134 commit c15de34

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

nipype/algorithms/confounds.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,8 +407,7 @@ def _run_interface(self, runtime):
407407
# "For each voxel time series, the temporal standard deviation is
408408
# defined as the standard deviation of the time series after the removal
409409
# of low-frequency nuisance terms (e.g., linear and quadratic drift)."
410-
imgseries = regress_poly(2, imgseries)
411-
imgseries = regress_poly(0, imgseries, remove_mean=True, axis=1) #this is super weird
410+
imgseries = regress_poly(2, imgseries, remove_mean=True)
412411

413412
time_voxels = imgseries.T
414413
num_voxels = np.prod(time_voxels.shape[1:])

nipype/algorithms/tests/test_compcor.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ def test_compcor(self):
5252

5353
def test_tcompcor(self):
5454
ccinterface = TCompCor(realigned_file=self.realigned_file, percentile_threshold=0.75)
55-
self.run_cc(ccinterface, [['-0.1535587949', '-0.4318584065'],
56-
['0.4286265207', '0.7162580102'],
57-
['-0.6288093202', '0.0465452630'],
58-
['0.5859742580', '-0.5144309306'],
59-
['-0.2322326636', '0.1834860639']])
55+
self.run_cc(ccinterface, [['-0.1114536190', '-0.4632908609'],
56+
['0.4566907310', '0.6983205193'],
57+
['-0.7132557407', '0.1340170559'],
58+
['0.5022537643', '-0.5098322262'],
59+
['-0.1342351356', '0.1407855119']])
6060

6161
def test_tcompcor_with_default_percentile(self):
6262
ccinterface = TCompCor(realigned_file=self.realigned_file)

0 commit comments

Comments
 (0)