Commit 1d16f461 authored by myron's avatar myron
Browse files

changed test data: flat contains dark

parent a0b51d22
Pipeline #42639 passed with stage
in 10 minutes and 30 seconds
......@@ -26,7 +26,7 @@ def bootstrap_TestCtf(request):
## the dimension number 1 is over holotomo distances, so far our filter is for one distance only
cls.rand_disp_vh.shape = [cls.rand_disp_vh.shape[0], cls.rand_disp_vh.shape[2]]
cls.dark = test_data["dark"]
cls.flats = [test_data["ref0"] - cls.dark, test_data["ref1"] - cls.dark]
cls.flats = [test_data["ref0"] , test_data["ref1"] ]
cls.im = test_data["im"]
cls.ipro = int(test_data["ipro"])
cls.expected_result = test_data["result"]
......@@ -83,7 +83,8 @@ class TestCtf(object):
remove_spikes_threshold = self.remove_spikes_threshold
my_flat = flats.get_flat(self.ipro)
my_img = self.im - self.dark
my_img = self.im - self.dark
my_flat = my_flat - self.dark
# spikes_corrector = CCDCorrection(
# self.dark.shape, median_clip_thresh=self.remove_spikes_threshold, abs_diff=True, preserve_borders=True
......@@ -106,10 +107,8 @@ class TestCtf(object):
padded_im = padded_im / padded_im.mean()
phase = ctf_filter.retrieve_phase(padded_im)
phase = ctf.recut(phase, original_shape_vh)
message = "retrieved phase and reference result differ beyond the accepted tolerance"
assert np.abs(phase - self.expected_result).max() < self.abs_tol * (np.abs(self.expected_result).mean()), message
......
Markdown is supported
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