@@ -15,7 +15,7 @@ def test_ActivationCount(tmpdir):
15
15
nb .Nifti1Image (np .random .normal (size = (5 , 5 , 5 )),
16
16
np .eye (4 )).to_filename (fname )
17
17
18
- acm = ActivationCount (in_files = in_files )
18
+ acm = ActivationCount (in_files = in_files , threshold = 1.65 )
19
19
res = acm .run ()
20
20
diff = nb .load (res .outputs .out_file )
21
21
pos = nb .load (res .outputs .acm_pos )
@@ -24,10 +24,10 @@ def test_ActivationCount(tmpdir):
24
24
25
25
26
26
@pytest .mark .parametrize ("threshold, above_thresh" , [
27
- (1 , 15.865 ), # above one standard deviation (one side)
28
- (2 , 2.275 ), # above two standard deviations (one side)
29
- (3 , 0.135 ) # above three standard deviations (one side)
30
- ])
27
+ (1 , 15.865 ), # above one standard deviation (one side)
28
+ (2 , 2.275 ), # above two standard deviations (one side)
29
+ (3 , 0.135 ) # above three standard deviations (one side)
30
+ ])
31
31
def test_ActivationCount_normaldistr (tmpdir , threshold , above_thresh ):
32
32
tmpdir .chdir ()
33
33
in_files = ['{:d}.nii' .format (i ) for i in range (3 )]
@@ -39,5 +39,7 @@ def test_ActivationCount_normaldistr(tmpdir, threshold, above_thresh):
39
39
res = acm .run ()
40
40
pos = nb .load (res .outputs .acm_pos )
41
41
neg = nb .load (res .outputs .acm_neg )
42
- assert np .isclose (pos .get_data ().mean (), above_thresh * 1.e-2 , rtol = 0.1 , atol = 1.e-4 )
43
- assert np .isclose (neg .get_data ().mean (), above_thresh * 1.e-2 , rtol = 0.1 , atol = 1.e-4 )
42
+ assert np .isclose (pos .get_data ().mean (),
43
+ above_thresh * 1.e-2 , rtol = 0.1 , atol = 1.e-4 )
44
+ assert np .isclose (neg .get_data ().mean (),
45
+ above_thresh * 1.e-2 , rtol = 0.1 , atol = 1.e-4 )
0 commit comments