From df1a018084337fe6f8235b7ee04531a2123e1899 Mon Sep 17 00:00:00 2001 From: appleb_m Date: Tue, 2 Dec 2025 13:34:38 +0100 Subject: [PATCH] DAQ: find_xtal.py bug where cx and cy were flipped --- common/src/aaredaqlib/find_xtal.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/src/aaredaqlib/find_xtal.py b/common/src/aaredaqlib/find_xtal.py index 51c8a6cf..94cbd763 100644 --- a/common/src/aaredaqlib/find_xtal.py +++ b/common/src/aaredaqlib/find_xtal.py @@ -266,12 +266,14 @@ def com_nan_check(com): def get_result_list_from_com(images, com: CenterOfMassModel): if not com_nan_check(com): return None - cy, cx = com.n_x, com.n_y + cx, cy = com.n_x, com.n_y + logger.info(f"cx is n_x: {cx}, cy is n_y: {cy},") start_x, end_x = round(cx - 1), round(cx + 1) start_y, end_y = round(cy - 1), round(cy + 1) logger.info(f"range x {start_x} {end_x}, y {start_y} {end_y}") result_list = [img for img in images if start_x <= img.nx <= end_x and start_y <= img.ny <= end_y] + logger.debug(result_list) return result_list def get_com_image_number(com, images):