Live 260708 #152
+1
-1
@@ -28,7 +28,7 @@ dependencies = [
|
||||
"bec_lib>=3.130.3",
|
||||
"bec-ipython-client>=3.130.3",
|
||||
"aarescan-client==1.0.0rc5",
|
||||
"aarelcinfer-client==0.1.1a6",
|
||||
"aarelcinfer-client==0.1.1a8",
|
||||
"matplotlib>=3.10.3",
|
||||
"httpx>=0.28.1",
|
||||
]
|
||||
|
||||
+11
-3
@@ -1821,9 +1821,10 @@ class AareDAQ:
|
||||
self.__cfg.set_busy(BeamlineStateEnum.SampleAlignment)
|
||||
try:
|
||||
self.__cfg.abr_meas_pos = AerotechCoordinate(at_mm=self.__devs.aerotech_pos.at_mm)
|
||||
self.__devs.bec_worker.save_current_aerotech_position()
|
||||
self.__devs.bec_worker.update_to_current_aerotech_position(pos=self.__devs.aerotech_pos)
|
||||
self.__cfg.state_busy = False
|
||||
except Exception:
|
||||
except Exception as e:
|
||||
logger.exception(f"Failed to save abr_meas_pos: {e}")
|
||||
self.__cfg.state_busy = False
|
||||
raise
|
||||
|
||||
@@ -2908,6 +2909,13 @@ class AareDAQ:
|
||||
|
||||
raise
|
||||
|
||||
except MountingFailed as e:
|
||||
logger.error(f"Failed to mount sample: {e}")
|
||||
if e.critical:
|
||||
raise e
|
||||
else:
|
||||
pass
|
||||
|
||||
except Exception as e:
|
||||
logger.error(f"Error in measure: {e}")
|
||||
if progress.current_step is not None:
|
||||
@@ -3224,7 +3232,7 @@ class AareDAQ:
|
||||
exp_shutter_open = self.__devs.exp_shutter.state()
|
||||
pss_prohibited = self.__devs.pss.is_prohibited()
|
||||
pss_alarm = self.__devs.pss.alarm_active()
|
||||
flux = self.__devs.full_flux
|
||||
flux = self.__devs.flux
|
||||
samcam_settings = self.__devs.samcam_settings
|
||||
bl = self.__bl
|
||||
transmission = self.__devs.transmission
|
||||
|
||||
@@ -197,6 +197,8 @@ class BeamlineDevices:
|
||||
@property
|
||||
def flux(self) -> float:
|
||||
# TODO FLUX
|
||||
if self._beamline == MXBeamline.X10SA:
|
||||
return self.bec_worker.get_flux_x10sa()
|
||||
return self.transmission * self.full_flux
|
||||
|
||||
@property
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -10,10 +10,8 @@ class RotationScanManager(QObject):
|
||||
super().__init__(parent)
|
||||
self.__beamline = mx_beamline()
|
||||
self.__detector_url = get_jfjoch_url(self.__beamline)
|
||||
self.__detector_url = None
|
||||
|
||||
@Slot(CompletedRotationScan)
|
||||
def scan_completed(self, r: CompletedRotationScan):
|
||||
if r.result.file_prefix is not None:
|
||||
# self.file_ready.emit(r.result.file_prefix, 0)
|
||||
self.file_ready.emit(self.__detector_url, 0)
|
||||
|
||||
Reference in New Issue
Block a user