fix: change how abr posotion is updated
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user