From f0c7877753ca868da5a25cd80d309200616d839f Mon Sep 17 00:00:00 2001 From: x01dc Date: Wed, 29 Jul 2026 14:40:15 +0200 Subject: [PATCH] f --- csaxs_bec/scans/lamni_components.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/csaxs_bec/scans/lamni_components.py b/csaxs_bec/scans/lamni_components.py index d643c194..3c9648ae 100644 --- a/csaxs_bec/scans/lamni_components.py +++ b/csaxs_bec/scans/lamni_components.py @@ -15,9 +15,7 @@ MOVEMENT_SCALE_Y = np.cos(np.radians(15)) class LamNIComponents(ScanComponents): @staticmethod - def lamni_compute_scan_center( - x: float, y: float, angle_deg: float - ) -> tuple[float, float]: + def lamni_compute_scan_center(x: float, y: float, angle_deg: float) -> tuple[float, float]: """ Compute the scan center in the stage coordinates based on the provided center in lamni coordinates and the rotation angle. @@ -111,8 +109,8 @@ class LamNIComponents(ScanComponents): logger.info( f"Compensating {[val/1000 for val in self.lamni_to_stage_coordinates(x_drift,y_drift)]}" ) - self._dev.lsamx.set(move_x) - self._dev.lsamy.set(move_y) + self._dev.lsamx.set(move_x).wait() + self._dev.lsamy.set(move_y).wait() time.sleep(0.01) rtx_current = self._dev.rtx.readback.get() @@ -148,8 +146,11 @@ class LamNIComponents(ScanComponents): + self.lamni_to_stage_coordinates(x_drift, y_drift)[1] / 1000 + self.lamni_to_stage_coordinates(x_drift2, y_drift2)[1] / 1000 ) - self._dev.lsamx.set(move_x) - self._dev.lsamy.set(move_y) + lsamx_set = self._dev.lsamx.set(move_x) + lsamy_set = self._dev.lsamy.set(move_y) + + lsamx_set.wait() + lsamy_set.wait() time.sleep(0.01) rtx_current = self._dev.rtx.readback.get()