iradon_sart: Test clip functionality and add a test for it.

This commit is contained in:
Jostein Bø Fløystad
2013-07-05 13:14:39 +02:00
parent a5df8d4630
commit a4870242b6
2 changed files with 4 additions and 1 deletions
@@ -347,6 +347,9 @@ def test_iradon_sart():
delta = np.mean(np.abs(reconstructed - image))
print('delta (2 iterations) =', delta)
assert delta < 0.013 * error_factor
reconstructed = iradon_sart(sinogram, theta, clip=(0, 1))
print('delta (1 iteration, clip) =', delta)
assert delta < 0.013 * error_factor
np.random.seed(1239867)
shifts = np.random.uniform(-3, 3, sinogram.shape[1])