@@ -48,20 +48,22 @@ def test_compcor(self):
48
48
49
49
self .run_cc (
50
50
CompCor (
51
+ num_components = 6 ,
51
52
realigned_file = self .realigned_file ,
52
53
mask_files = self .mask_files ,
53
54
mask_index = 0 ), expected_components )
54
55
55
56
self .run_cc (
56
57
ACompCor (
58
+ num_components = 6 ,
57
59
realigned_file = self .realigned_file ,
58
60
mask_files = self .mask_files ,
59
61
mask_index = 0 ,
60
62
components_file = 'acc_components_file' ), expected_components ,
61
63
'aCompCor' )
62
64
63
65
def test_tcompcor (self ):
64
- ccinterface = TCompCor (
66
+ ccinterface = TCompCor (num_components = 6 ,
65
67
realigned_file = self .realigned_file , percentile_threshold = 0.75 )
66
68
self .run_cc (ccinterface , [['-0.1114536190' , '-0.4632908609' ], [
67
69
'0.4566907310' , '0.6983205193'
@@ -70,7 +72,8 @@ def test_tcompcor(self):
70
72
], ['-0.1342351356' , '0.1407855119' ]], 'tCompCor' )
71
73
72
74
def test_tcompcor_no_percentile (self ):
73
- ccinterface = TCompCor (realigned_file = self .realigned_file )
75
+ ccinterface = TCompCor (num_components = 6 ,
76
+ realigned_file = self .realigned_file )
74
77
ccinterface .run ()
75
78
76
79
mask = nb .load ('mask_000.nii.gz' ).get_data ()
@@ -80,6 +83,7 @@ def test_tcompcor_no_percentile(self):
80
83
def test_compcor_no_regress_poly (self ):
81
84
self .run_cc (
82
85
CompCor (
86
+ num_components = 6 ,
83
87
realigned_file = self .realigned_file ,
84
88
mask_files = self .mask_files ,
85
89
mask_index = 0 ,
@@ -160,7 +164,6 @@ def run_cc(self,
160
164
assert ccresult .outputs .components_file == expected_file
161
165
assert os .path .exists (expected_file )
162
166
assert os .path .getsize (expected_file ) > 0
163
- assert ccinterface .inputs .num_components == 6
164
167
165
168
with open (ccresult .outputs .components_file , 'r' ) as components_file :
166
169
expected_n_components = min (ccinterface .inputs .num_components ,
0 commit comments