From 471f853663e79c0eab4c4cd7efd4e297d8cb2cc3 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Tue, 2 Sep 2025 16:44:45 +0200 Subject: [PATCH] DAQ: changed error handling so if rotation scan only happens if ALC succeeds and otherwise continues to next sample --- daq/src/aaredaq/daq.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/daq/src/aaredaq/daq.py b/daq/src/aaredaq/daq.py index 398e9473..9ac9bb7d 100644 --- a/daq/src/aaredaq/daq.py +++ b/daq/src/aaredaq/daq.py @@ -220,6 +220,9 @@ class AareDAQ: #Reenable TELL after doors locked self.__devs.tell.check_enable_motion() + + #self.__devs.tell.wait_mount_complete() + if self.__devs.tell.is_in_park(): self.__devs.tell.move_cold(wait=True) time.sleep(30) @@ -810,7 +813,7 @@ class AareDAQ: hex_string = secrets.token_hex(3) # 3 bytes = 6 hex characters print(hex_string.upper()) - if not self.__auto_center(RasterGridRequest( + if self.__auto_center(RasterGridRequest( exp_time_s=0.01, file_prefix=sample_prefix + f"_{hex_string}", smargon= SmargonCoordinate(), @@ -820,14 +823,12 @@ class AareDAQ: grid_size_mm=Coordinate(x=geom.beam_size_mm.x * 0.8, y=geom.beam_size_mm.y * 0.8), omega_deg=0 )): - raise LoopCenteringFailed - - self.__rotation( RotationScanRequest(start_omega_deg=0, - dtz=110.0, - file_prefix=sample_prefix + f"_{hex_string}", - exp_time_s=0.003, - incr_omega_deg=0.4, - steps=900,)) + self.__rotation( RotationScanRequest(start_omega_deg=0, + dtz=110.0, + file_prefix=sample_prefix + f"_{hex_string}", + exp_time_s=0.003, + incr_omega_deg=0.4, + steps=900,)) self.__cfg.state_busy = False except Exception: self.__aare.sample_failed(sample)