Commit e96b2709 authored by Nicola Vigano's avatar Nicola Vigano
Browse files

CoR: added test for linear convolution



Signed-off-by: Nicola Vigano's avatarNicola VIGANÒ <nicola.vigano@esrf.fr>
parent 7dc012bf
......@@ -90,6 +90,19 @@ class TestCor:
)
assert np.abs(self.px - cor_position) < self.cor_tol, message
def test_cor_posx_linear(self):
radio1 = self.data[0, :, :]
radio2 = np.fliplr(self.data[1, :, :])
CoR_calc = CenterOfRotation()
cor_position = CoR_calc.find_shift(radio1, radio2, padding_mode='constant')
message = (
"Computed CoR %f " % cor_position
+ " and real CoR %f do not coincide" % self.px
)
assert np.abs(self.px - cor_position) < self.cor_tol, message
def test_error_checking_001(self):
CoR_calc = CenterOfRotation()
......
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