Skip to content

Commit 6a88b3a

Browse files
author
Shoshana Berleant
committed
robuster tests
1 parent e245073 commit 6a88b3a

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

nipype/algorithms/tests/test_compcor.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,18 +60,20 @@ def test_compcor_with_extra_regressors(self, mock_add_extras):
6060
assert_true(mock_add_extras.called)
6161

6262
def test_tcompcor(self):
63+
ccinterface = TCompCor(realigned_file=self.realigned_file, percentile_threshold=0.75)
64+
self.run_cc(ccinterface, [['-0.1535587949', '-0.4318584065'],
65+
['0.4286265207', '0.7162580102'],
66+
['-0.6288093202', '0.0465452630'],
67+
['0.5859742580', '-0.5144309306'],
68+
['-0.2322326636', '0.1834860639']])
69+
70+
def test_tcompcor_with_default_percentile(self):
6371
ccinterface = TCompCor(realigned_file=self.realigned_file)
64-
self.run_cc(ccinterface, [['-0.2500000000'], ['0.2500000000'],
65-
['-0.2500000000'], ['0.7500000000'],
66-
['-0.5000000000']])
67-
68-
def test_tcompcor_with_percentile(self):
69-
ccinterface = TCompCor(realigned_file=self.realigned_file, percentile_threshold=0.2)
7072
ccinterface.run()
7173

7274
mask = nb.load('mask.nii').get_data()
7375
num_nonmasked_voxels = np.count_nonzero(mask)
74-
assert_equal(num_nonmasked_voxels, 2)
76+
assert_equal(num_nonmasked_voxels, 1)
7577

7678
def run_cc(self, ccinterface, expected_components):
7779
# run

0 commit comments

Comments
 (0)