Swapped the order of CSM so y axis is completed first

This commit is contained in:
Chish36 2025-06-09 14:39:06 +01:00 committed by Julian Stirling
parent 37960a4cc2
commit 7eed48ed26

View file

@ -228,10 +228,12 @@ class CameraStageMapper(Thing):
This performs two 1d calibrations in x and y, then combines their results.
"""
logger.info("Calibrating X axis:")
cal_x: dict = self.calibrate_1d(hw, stage, logger, (1, 0, 0))
# Calibrate y-axis first as it is more likely to fail.
# The x-y difference is due to the camera aspect ratio, not the stage hardware.
logger.info("Calibrating Y axis:")
cal_y: dict = self.calibrate_1d(hw, stage, logger, (0, 1, 0))
logger.info("Calibrating X axis:")
cal_x: dict = self.calibrate_1d(hw, stage, logger, (1, 0, 0))
logger.info("Calibration complete, updating metadata.")
# Combine X and Y calibrations to make a 2D calibration