From 7e437ae24f438fc58fad85884989c9499cedb587 Mon Sep 17 00:00:00 2001 From: x12sa Date: Wed, 8 Jul 2026 11:04:09 +0200 Subject: [PATCH] replace yesno with gui yesno --- .../plugins/flomni/flomni.py | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/csaxs_bec/bec_ipython_client/plugins/flomni/flomni.py b/csaxs_bec/bec_ipython_client/plugins/flomni/flomni.py index 9a463c9..ab6bd26 100644 --- a/csaxs_bec/bec_ipython_client/plugins/flomni/flomni.py +++ b/csaxs_bec/bec_ipython_client/plugins/flomni/flomni.py @@ -457,14 +457,14 @@ class FlomniSampleTransferMixin: print("Moving X-ray eye in.") - if self.OMNYTools.yesno( - "Please confirm that this is ok with the flight tube. This check is to be removed after commissioning", - "n", - ): - print("OK. continue.") - else: - print("Stopping.") - raise FlomniError("Manual abort of x-ray eye in.") + # if self.OMNYTools.yesno( + # "Please confirm that this is ok with the flight tube. This check is to be removed after commissioning", + # "n", + # ): + # print("OK. continue.") + # else: + # print("Stopping.") + # raise FlomniError("Manual abort of x-ray eye in.") self.feye_in() print("Moving X-ray optics out.") @@ -1099,10 +1099,13 @@ class FlomniSampleTransferMixin: fsamx_pos = dev.fsamx.readback.get() if position == 0 and fsamx_pos > -160: - if self.OMNYTools.yesno( - "May the flomni stage be moved out for the sample change? Feedback will be disabled and alignment will be lost!", - "y", - ): + print("Use GUI interface.") + if self.ftransfer_confirm_dialog("May the flomni stage be moved out for the sample change? Feedback will be disabled and alignment will be lost!", "y"): + + # if self.OMNYTools.yesno( + # "May the flomni stage be moved out for the sample change? Feedback will be disabled and alignment will be lost!", + # "y", + # ): print("OK. continue.") self.ftransfer_flomni_stage_out() else: @@ -1113,7 +1116,7 @@ class FlomniSampleTransferMixin: self.check_tray_in() if position == 0: - umv(dev.ftransx, 11.05, dev.ftransz, 3.5950) + umv(dev.ftransx, 11.02, dev.ftransz, 3.5950) if position == 1: umv( dev.ftransx, @@ -2390,7 +2393,7 @@ class Flomni( offsets = self.get_alignment_offset(angle) normal_offset_x = offsets[0] direction = -1 if normal_offset_x >= 0 else 1 - sum_offset_x = normal_offset_x + direction * (self.fovx / 2) + direction * 10 + sum_offset_x = normal_offset_x + direction * (self.fovx / 2) + direction * 20 sum_offset_y = ( offsets[1] - self.compute_additional_correction_y(angle)