From a30bc8e5c50d01f284c793f4d290d5e836292595 Mon Sep 17 00:00:00 2001 From: x12sa Date: Thu, 15 Oct 2026 14:02:38 +0200 Subject: [PATCH] fix(lamni): check filters after leye_out in tomo_alignment_scan leye_out() retracts the filters via csaxs.fil_trans(1), so checking before it warned about filters that were about to be removed anyway. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01ALDnH16dC6iyHjhe5Ey4w9 --- csaxs_bec/bec_ipython_client/plugins/LamNI/lamni.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/csaxs_bec/bec_ipython_client/plugins/LamNI/lamni.py b/csaxs_bec/bec_ipython_client/plugins/LamNI/lamni.py index 5abde1d7..57516624 100644 --- a/csaxs_bec/bec_ipython_client/plugins/LamNI/lamni.py +++ b/csaxs_bec/bec_ipython_client/plugins/LamNI/lamni.py @@ -1546,6 +1546,11 @@ class LamNI( bec = builtins.__dict__.get("bec") dev = builtins.__dict__.get("dev") + # leye_out() retracts the filters (csaxs.fil_trans(1)), so check only + # afterwards -- checking first warned about filters it was about to + # remove anyway. + self.leye_out() + all_out, offending = filters_out_of_beam(dev) if not all_out: warning = f"Not all filters are out of the beam: {', '.join(offending)}." @@ -1553,8 +1558,6 @@ class LamNI( print("Aborting alignment scan.") return - self.leye_out() - self.write_alignment_scan_numbers(bec.queue.next_scan_number) angles = list(np.linspace(0, 360, num=12, endpoint=False))