@@ -60,18 +60,20 @@ def test_compcor_with_extra_regressors(self, mock_add_extras):
60
60
assert_true (mock_add_extras .called )
61
61
62
62
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 ):
63
71
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 )
70
72
ccinterface .run ()
71
73
72
74
mask = nb .load ('mask.nii' ).get_data ()
73
75
num_nonmasked_voxels = np .count_nonzero (mask )
74
- assert_equal (num_nonmasked_voxels , 2 )
76
+ assert_equal (num_nonmasked_voxels , 1 )
75
77
76
78
def run_cc (self , ccinterface , expected_components ):
77
79
# run
0 commit comments