Files
csaxs_bec/tests
x01dcandClaude Sonnet 5 c802104f6d
CI for csaxs_bec / test (push) Successful in 1m51s
fix(omny): fix stale widget-API bugs in gui_tools.py cameras/xray-eye, add cam_xeye
Live testing of the previous gui_tools.py port (49ade7c) hit two further crashes:

1. omnygui_show_xeyealign() -> ValueError: Device 'cam_xeye' not found in current
   BEC session. The OMNY_XRayEye widget (shared verbatim with flomni) hardcodes
   CAMERA = ("cam_xeye", "image") as a module constant -- it isn't configurable
   per-beamline, so omny needs its own cam_xeye device or the widget can never be
   constructed. Added cam_xeye to simulated_omny.yaml (hand-added, duplicating
   flomni's real cam_xeye's camera_id/pixel_calibration as placeholders; SimIDSCamera
   already accepts both camera_id and the legacy camera_ID key omny's other cameras
   use). ptycho_omny.yaml intentionally left untouched -- the real hardware camera ID
   and pixel calibration for OMNY's x-ray-eye camera are unknown; noted as a followup
   in OPEN_ISSUES.md, including that a future regen of simulated_omny.yaml from
   ptycho_omny.yaml will drop this hand-added block until the real config has one too.

2. omnygui_show_omnycam_parking() -> ValueError: Unknown widget type: BECImageWidget.
   That string was carried over unmodified from omny's pre-modernization code, not
   from flomni's current gui_tools.py (whose current class name is "Image"). Beyond
   the widget name, the per-camera calls inside were also stale: fig.set_rotation(
   deg_90=3) doesn't exist on the current Image/ImageBase widget at all (replaced by
   the num_rotation_90 property), and self.figN.lock_aspect_ratio(True) called a
   property as a function. Ported omnygui_show_omnycam_parking()/
   omnygui_show_omnycam_samplestage() onto flomni's current per-camera pattern
   (image(device=, signal="preview"), num_rotation_90/lock_aspect_ratio as
   properties, start_live_mode()), preserving the existing 3x90 rotation for
   cam200/cam203 (physical mount) and no rotation for cam201/cam202, unchanged from
   before.

Also removed omnygui_show_cameras() (added last pass, modeled on flomni's single
generic camera view): redundant now that both existing parking/samplestage views got
the current API, since omny -- unlike flomni -- already has two purpose-built camera
views. Its hard-stop console (z_ConsoleButtonsWidget, targeting otransy) now lives
directly in both omnygui_show_omnycam_parking() and omnygui_show_omnycam_samplestage()
instead.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QLrD7sVYGLAzsQjLVJpCgt
2026-09-01 22:19:46 +02:00
..
2026-06-24 12:55:32 +02:00