Commit 284b7138 authored by Nicola Vigano's avatar Nicola Vigano
Browse files

Alignment: fixed shifts in test


Signed-off-by: Nicola Vigano's avatarNicola VIGANÒ <nicola.vigano@esrf.fr>
parent 37713ab9
Pipeline #28030 passed with stages
in 4 minutes and 2 seconds
......@@ -35,14 +35,14 @@ def bootstrap_dtr(request):
cls.align_images = align_imgs - dark_img
cls.img_pos = (1 + np.arange(6)) * 0.01
cls.expected_shifts_vh = np.array((2551.25, 308.9))
cls.expected_shifts_vh = np.array((311.25, 308.9))
cls.reference_shifts_list = [
[-121.39034751, 11.29080154],
[-117.01864405, 3.81080018],
[-115.66542712, 9.73375546],
[-116.72357645, 16.71435394],
[6.024768, 20.28406386],
[-9.39, 11.29],
[-5.02, 3.81],
[-3.67, 9.73],
[-4.72, 16.71],
[6.02, 20.28],
]
......@@ -220,11 +220,11 @@ class TestDetectorTranslation(object):
shifts_v, shifts_h, found_shifts_list = T_calc.find_shift(self.align_images, self.img_pos, return_shifts=True)
message = "Computed shifts coefficients %s and found ones %s do not coincide" % (
message = "Computed shifts coefficients %s and expected %s do not coincide" % (
(shifts_v, shifts_h),
self.expected_shifts_vh,
)
assert np.all(np.isclose(self.expected_shifts_vh, [shifts_v, shifts_h], atol=self.abs_tol)), message
message = "Computed shifts %s and found ones %s do not coincide" % (found_shifts_list, self.reference_shifts_list)
message = "Computed shifts %s and expected %s do not coincide" % (found_shifts_list, self.reference_shifts_list)
assert np.all(np.isclose(found_shifts_list, self.reference_shifts_list, atol=self.abs_tol)), message
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