From 9eb0b6a6b8d938b0ee36327d457f92d593796c00 Mon Sep 17 00:00:00 2001 From: jaknapper Date: Fri, 5 Jan 2024 18:41:57 +0000 Subject: [PATCH] Log CSM result in a safe way --- .../things/camera_stage_mapping.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/openflexure_microscope_server/things/camera_stage_mapping.py b/src/openflexure_microscope_server/things/camera_stage_mapping.py index 626e5392..d06a37aa 100644 --- a/src/openflexure_microscope_server/things/camera_stage_mapping.py +++ b/src/openflexure_microscope_server/things/camera_stage_mapping.py @@ -196,6 +196,10 @@ class CameraStageMapper(Thing): self.thing_settings.update(denumpify(cal_xy)) self.thing_settings["image_resolution"] = corrected_resolution + csm_matrix = cal_xy["image_to_stage_displacement"] + csm_as_string = f'[{round(csm_matrix[0][0], 2)}, {round(csm_matrix[0][1], 2)},],[{round(csm_matrix[1][0], 2)}, {round(csm_matrix[1][1], 2)}]' + logger.info(f"CSM matrix is {csm_as_string}.") + data: Dict[str, dict] = { "camera_stage_mapping_calibration": cal_xy, "linear_calibration_x": cal_x,