Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

Commit

Permalink
Recreated Affine objects from em_affines
Browse files Browse the repository at this point in the history
  • Loading branch information
teresamg committed Dec 15, 2022
1 parent 96ebab5 commit 641422b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def test_proximity_estimator_trivial_model(datadir, tmp_path):

estimator = EddyMotionEstimator()
em_affines = estimator.fit(
dwdata=dwi_motion, models=("b0", ), align_kwargs=None, seed=None
dwdata=dwi_motion, models=("b0",), align_kwargs=None, seed=None
)

# Uncomment to see the realigned dataset
Expand All @@ -95,4 +95,5 @@ def test_proximity_estimator_trivial_model(datadir, tmp_path):
coords = xfms.reference.ndcoords.T
for i, est in enumerate(em_affines):
xfm = nt.linear.Affine(xfms.matrix[i], reference=b0nii)
est = nt.linear.Affine(est, reference=b0nii)
assert np.sqrt(((xfm.map(coords) - est.map(coords)) ** 2).sum(1)).mean() < 0.2

0 comments on commit 641422b

Please sign in to comment.