Commit bc21aca9 authored by Pierre Paleo's avatar Pierre Paleo
Browse files

Multi-FBP seems to be OK

parent 8aa27872
......@@ -33,7 +33,7 @@ class TestFBP(ParametrizedTestCase):
"""
Simple test of a FBP on a 512x512 slice
"""
B = Backprojector(512, 500)
B = Backprojector((500, 512))
res = B.fbp(self.sino_512)
delta_clipped = self.clip_to_inner_circle(res - self.ref_512)
......@@ -47,7 +47,7 @@ class TestFBP(ParametrizedTestCase):
"""
Test FBP of a 511x511 slice where the rotation axis is at (512-1)/2.0
"""
B = Backprojector(511, 500, rot_center=255.5)
B = Backprojector((500, 511), rot_center=255.5)
res = B.fbp(self.sino_511)
ref = self.ref_512[:-1, :-1]
......@@ -58,6 +58,23 @@ class TestFBP(ParametrizedTestCase):
def test_multi_fbp(self):
multi_sino = np.tile(self.sino_511, (4, 1, 1))
B = Backprojector(multi_sino.shape, rot_center=255.5)
res = B.fbp(multi_sino)
self.assertLess(
np.max(np.abs(np.std(res, axis=0))),
1e-5,
"Something wrong with multi-FBP"
)
ref = self.ref_512[:-1, :-1]
delta_clipped = self.clip_to_inner_circle(res[0] - ref)
err_max = np.max(np.abs(delta_clipped))
self.assertLess(err_max, self.tol, "Max error is too high")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment