From 80f6972a311147fd5a3c157c64b1827fdad7ea74 Mon Sep 17 00:00:00 2001 From: x01dc Date: Mon, 20 Jul 2026 21:37:51 +0200 Subject: [PATCH] feat/show at_each_angle_hook in lamni tomo_parameters() flomni's tomo_parameters() CLI printout already showed the active at_each_angle_hook; lamni's didn't, making it easy to have a custom per-projection hook active without noticing from the parameter dump. Added the identical guarded print, reusing the shared TomoQueueMixin._describe_active_hook() helper both classes already inherit. Also switched lamni's tomo_scan() end-of-scan summary to use that same helper instead of the raw attribute, matching flomni's equivalent block and correctly flagging a stale/unregistered hook name. Co-Authored-By: Claude Sonnet 5 --- csaxs_bec/bec_ipython_client/plugins/LamNI/lamni.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/csaxs_bec/bec_ipython_client/plugins/LamNI/lamni.py b/csaxs_bec/bec_ipython_client/plugins/LamNI/lamni.py index 184f68d..fcb659e 100644 --- a/csaxs_bec/bec_ipython_client/plugins/LamNI/lamni.py +++ b/csaxs_bec/bec_ipython_client/plugins/LamNI/lamni.py @@ -1190,7 +1190,7 @@ class LamNI(TomoQueueMixin, LamNIAlignmentMixin, LamNIOpticsMixin, LamniGuiTools f"Sample: {self.sample_name}", ] if self.at_each_angle_hook: - timing_lines.append(f"At-each-angle hook: {self.at_each_angle_hook}") + timing_lines.append(f"At-each-angle hook: {self._describe_active_hook()}") if elapsed_s is not None: timing_lines.append(f"Total measurement time: {self._format_duration(elapsed_s)}") timing_lines.append( @@ -1265,6 +1265,8 @@ class LamNI(TomoQueueMixin, LamNIAlignmentMixin, LamNIOpticsMixin, LamniGuiTools print(f" _tomo_fovy_offset = {self.tomo_fovy_offset:.4f}") print(f" _manual_shift_x = {self.manual_shift_x:.4f}") print(f" _manual_shift_y = {self.manual_shift_y:.4f}") + if self.at_each_angle_hook: + print(f"At-each-angle hook = {self._describe_active_hook()}") print("") if self.tomo_type == 1: print("\x1b[1mTomo type 1:\x1b[0m 8 equally spaced sub-tomograms (360 deg)")