We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4b93c9e + beaf3b8 commit 60e97d5Copy full SHA for 60e97d5
nipype/algorithms/tests/test_stats.py
@@ -0,0 +1,22 @@
1
+# -*- coding: utf-8 -*-
2
+# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
3
+# vi: set ft=python sts=4 ts=4 sw=4 et:
4
+
5
+import numpy as np
6
+import nibabel as nb
7
+from nipype.algorithms.stats import ACM
8
9
10
+def test_ACM(tmpdir):
11
+ tmpdir.chdir()
12
+ in_files = ['{:d}.nii'.format(i) for i in range(3)]
13
+ for fname in in_files:
14
+ nb.Nifti1Image(np.random.normal(size=(5, 5, 5)),
15
+ np.eye(4)).to_filename(fname)
16
17
+ acm = ACM(in_files=in_files)
18
+ res = acm.run()
19
+ diff = nb.load(res.outputs.out_file)
20
+ pos = nb.load(res.outputs.acm_pos)
21
+ neg = nb.load(res.outputs.acm_neg)
22
+ assert np.allclose(diff.get_data(), pos.get_data() - neg.get_data())
0 commit comments