diff --git a/csaxs_bec/bec_ipython_client/plugins/LamNI/x_ray_eye_align.py b/csaxs_bec/bec_ipython_client/plugins/LamNI/x_ray_eye_align.py index 9abe225..c9a3fcd 100644 --- a/csaxs_bec/bec_ipython_client/plugins/LamNI/x_ray_eye_align.py +++ b/csaxs_bec/bec_ipython_client/plugins/LamNI/x_ray_eye_align.py @@ -144,6 +144,12 @@ class XrayEyeAlign: it is hard to locate the sample between rotations. The caller is responsible for closing the shutter afterwards. """ + # self.gui is lamni.xeyegui, which is None until the widget has been + # opened at least once -- unlike align()/find_rotation_center(), this + # is often the first X-ray-eye call of a session (see leye_in()), so + # it must open the widget itself rather than assume it already exists. + if self.gui is None: + self.lamni.lamnigui_show_xeyealign() if not dev.cam_xeye.live_mode_enabled.get(): dev.cam_xeye.live_mode_enabled.put(True) self.gui.on_live_view_enabled(True)