fix: change how abr posotion is updated

This commit is contained in:
2026-07-09 10:21:13 +02:00
committed by perl_d
parent 6c91c34451
commit 59508d391f
+14 -1
View File
@@ -6,6 +6,7 @@ from aarecommon.config.beamline import cfg_get, mx_beamline
from aarecommon.config.logger import setup_logger
from aarecommon.config.logger_events import log_timing
from aarecommon.errors.exception_handler import BECCommunicationError
from aarecommon.math.coordinate import AerotechCoordinate
from aarecommon.models.beamline import MXBeamline
from bec_ipython_client import BECIPythonClient
from bec_ipython_client.signals import OperationMode
@@ -508,13 +509,25 @@ class BECClientWorker:
save_current_position(self.dev.coll_y, "work")
def save_current_aerotech_position(self):
save_current_position(self.dev.aerotech, "work", axis="x")
save_current_position(self.dev.aerotech, "in", axis="x")
save_current_position(self.dev.aerotech, "work", axis="y")
save_current_position(self.dev.aerotech, "work", axis="z")
self.save_config_and_reload_devices()
def update_to_current_aerotech_position(self, pos: AerotechCoordinate):
logger.info(f"Updating Aerotech position to {pos}")
update_position(self.dev.aerotech, "in", pos.at_mm.x, axis="x",)
update_position(self.dev.aerotech, "work", pos.at_mm.y, axis="y")
update_position(self.dev.aerotech, "work", pos.at_mm.z, axis="z")
self.save_config_and_reload_devices()
def save_config_and_reload_devices(self):
logger.info("Saving BEC config and reloading devices")
self.position_devices, self.planner = save_and_reload()
logger.info("BEC config and devices reloaded")
def get_flux_x10sa(self):
return bpm2flux()
@property
def zoom(self):