Skip to content

Commit 20a8ac2

Browse files
authored
fix some wierd unrelated numerical issue in dead sinogram code (#1394)
1 parent 46fb1d4 commit 20a8ac2

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tests/test_sinogram.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def test_project_multidim(num_ang):
132132
single_sinogram = img.project(rads)
133133

134134
# These should be allclose up to determinism in the FFT and NUFFT.
135-
np.testing.assert_allclose(s[i, j : j + 1], single_sinogram)
135+
np.testing.assert_allclose(s[i, j : j + 1], single_sinogram, atol=1e-8)
136136

137137
# Next individually compute sk's radon transform for each image.
138138
# Note, `radon` does not admit read only views, so the slice is copied.
@@ -215,7 +215,9 @@ def test_backproject_multidim(num_ang):
215215
back_project = single_sinogram.backproject(rads)
216216

217217
# These should be allclose up to determinism.
218-
np.testing.assert_allclose(ours_backward[i, j : j + 1], back_project[0])
218+
np.testing.assert_allclose(
219+
ours_backward[i, j : j + 1], back_project[0], atol=1e-08
220+
)
219221

220222
# Next individually compute sk's iradon transform for each image.
221223
reference_back_projects[i, j] = (

0 commit comments

Comments
 (0)