minor fixes: basepath correction file, raise gui #100

Merged
holler merged 1 commits from flomni_test2_xrayaligngui into main 2025-11-03 11:29:05 +01:00
2 changed files with 21 additions and 4 deletions

View File

@@ -468,7 +468,7 @@ class FlomniSampleTransferMixin:
def ftransfer_flomni_stage_out(self):
self.flomnigui_show_cameras()
self.flomnigui_raise()
target_pos = -162
if np.isclose(dev.fsamx.readback.get(), target_pos, 0.01):
@@ -924,7 +924,20 @@ class FlomniSampleTransferMixin:
class FlomniAlignmentMixin:
default_correction_file = "correction_flomni_20210300_360deg.txt"
import csaxs_bec
import os
from pathlib import Path
# Ensure this is a Path object, not a string
csaxs_bec_basepath = Path(csaxs_bec.__file__)
default_correction_file_rel = "correction_flomni_20210300_360deg.txt"
# Build the absolute path correctly
default_correction_file = (
csaxs_bec_basepath.parent / 'bec_ipython_client' / 'plugins' / 'flomni' / default_correction_file_rel
).resolve()
def reset_correction(self, use_default_correction=True):
"""
@@ -1186,8 +1199,8 @@ class Flomni(
umv(dev.fsamx, fsamx_in)
raise exc
def xrayeye_update_frame(self):
self.align.update_frame()
def xrayeye_update_frame(self,keep_shutter_open=False):
self.align.update_frame(keep_shutter_open)
def xrayeye_alignment_start(self, keep_shutter_open=False):
self.start_x_ray_eye_alignment(keep_shutter_open)

View File

@@ -105,6 +105,10 @@ class XrayEyeAlign:
print("This routine can be called with paramter keep_shutter_open=True to keep the shutter always open")
self.send_message("Getting things ready. Please wait...")
#potential unresolved movement requests to zero
epics_put("XOMNYI-XEYE-MVX:0", 0)
epics_put("XOMNYI-XEYE-MVY:0", 0)
# reset shift xy and fov params
self._reset_init_values()