Skip to content

Commit b71eac7

Browse files
jhlegarretaoesteban
andcommitted
REF: Remove image change percentage function
Remove image change percentage function from the `analysis.utils` module as it is a metric of image similarity rather than a metric of motion. Co-authored-by: Oscar Esteban <code@oscaresteban.es>
1 parent b99ea5a commit b71eac7

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

nitransforms/tests/test_analysis.py

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
from nitransforms.analysis.utils import (
1111
compute_fd_from_motion,
1212
compute_fd_from_transform,
13-
compute_percentage_change,
1413
displacements_within_mask,
1514
extract_motion_parameters,
1615
identify_spikes,
@@ -137,34 +136,6 @@ def test_extract_motion_parameters(affine, expected_trans, expected_rot):
137136
assert np.allclose(params[3:], expected_rot)
138137

139138

140-
@pytest.mark.parametrize(
141-
"reference, test, mask, expected",
142-
[
143-
(
144-
np.array([[1.0, 2.0], [0.0, 4.0]]),
145-
np.array([[2.0, 1.0], [3.0, 8.0]]),
146-
np.array([[True, True], [True, True]]),
147-
np.array([[(2.0 - 1.0) / 1.0, (1.0 - 2.0) / 2.0], [0, (8.0 - 4.0) / 4.0]]) * 100,
148-
),
149-
(
150-
np.zeros((2,2)),
151-
np.ones((2,2)),
152-
np.ones((2,2), dtype=bool),
153-
np.zeros((2,2)),
154-
),
155-
(
156-
np.array([[5, 10], [15, 20]]),
157-
np.array([[10, 5], [30, 10]]),
158-
np.array([[False, True], [True, False]]),
159-
np.array([[0, (5 - 10) / 10], [(30 - 15) / 15, 0]]) * 100,
160-
),
161-
],
162-
)
163-
def test_compute_percentage_change_param(reference, test, mask, expected):
164-
result = compute_percentage_change(reference, test, mask)
165-
np.testing.assert_array_almost_equal(result, expected)
166-
167-
168139
def test_identify_spikes(request):
169140
rng = request.node.rng
170141

0 commit comments

Comments
 (0)