From ac6f67cc53e25f1410519890460b6b2597ebeac5 Mon Sep 17 00:00:00 2001 From: Ivan Usov Date: Tue, 8 Feb 2022 15:23:03 +0100 Subject: [PATCH] Reduce scan motor position precision for merging --- pyzebra/ccl_process.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyzebra/ccl_process.py b/pyzebra/ccl_process.py index f395b09..54c1f77 100644 --- a/pyzebra/ccl_process.py +++ b/pyzebra/ccl_process.py @@ -22,6 +22,8 @@ MAX_RANGE_GAP = { "omega": 0.5, } +MOTOR_POS_PRECISION = 0.01 + AREA_METHODS = ("fit_area", "int_area") @@ -122,7 +124,7 @@ def merge_scans(scan_into, scan_from): err_tmp = err_all[:1] num_tmp = np.array([1]) for pos, val, err in zip(pos_all[1:], val_all[1:], err_all[1:]): - if pos - pos_tmp[-1] < 0.0005: + if pos - pos_tmp[-1] < MOTOR_POS_PRECISION: # the repeated motor position val_tmp[-1] += val err_tmp[-1] += err