Commit Graph
1431 Commits
Author SHA1 Message Date
appleb_mandClaude Opus 4.8 293e28f463 new_gui: adopt backend-mounted sample on restart (status.sample sync)
Mount state was GUI-local, so a restart 'forgot' a physically-mounted sample.
_on_status now syncs from status.sample: adopt it when the GUI is empty or shows
a different sample (no robot mount), with a guard (_last_unmount_id) so a just-
unmounted sample isn't re-adopted from a stale poll. AppState.sync_mounted.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 10:55:08 +02:00
appleb_mandClaude Opus 4.8 14576216bd new_gui: hybrid manual queue nav + fast in-place reorder + visible arrows
Hybrid manual:
- AppState queue cursor (queue_next/queue_advance); changer 'FROM QUEUE' bar:
  Mount next / Skip; pick any sample as before. Pairs with run-plan + breakpoints
  for run-to-step-then-takeover.

Reorder perf + arrows (user feedback):
- in-place reorder: rows are moved + reindexed (QueueList.reflow, QueueRow.update_item)
  instead of rebuilt -> drag and up/down stay fast even for big queues
- up/down use Qt standard icons (always render; previously empty/'pink' boxes)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 10:13:42 +02:00
appleb_mandClaude Opus 4.8 507182505e new_gui: readable combos/spinboxes + always-visible 'currently mounted' card
- theme.py: global QSS for QComboBox/QAbstractSpinBox (+popup) so sort, ABR step,
  run-number etc. are dark-on-light (fixes white-on-white)
- sample_changer: 'CURRENTLY MOUNTED' card pinned above the list (name+location,
  accent when mounted) via set_mounted_sample; manual_view feeds the sample

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 10:01:29 +02:00
appleb_mandClaude Opus 4.8 a669790cfb new_gui: GUI-driven per-stage automation + queue drag-reorder, add-all, sort
- AutomationRunner (main_window): drives each queued sample mount -> enabled
  protocol stages -> unmount via per-stage daq ops; advances on raster/standard
  completion or busy edge; pausable per step; live beam-rail progress. Replaces
  automated_scan-per-sample. raster=raster_scan_auto, collect/xrf=YAML defaults.
- queue: drag-to-reorder rows (QueueList drop target + QueueRow QDrag handle) +
  AppState.queue_reorder; ▲▼ kept as fallback
- library: Add all button, sort (Name/Puck/Location/Priority), search across
  name/puck/location, shown/total count

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 09:40:30 +02:00
appleb_mandClaude Opus 4.8 3b24a23530 new_gui: pausable pipeline + run-plan stage toggles
- AppState: protocol (run-plan {center,raster,xrf,collect}), run_status
  (idle/running/paused/breakpoint), advance_past
- pipeline_panel: RunPlanRow chips (which stages run) + transport status uses
  run_status (Running/Paused/Stopped at breakpoint)
- manual_view: pausable auto-run runner — Play executes the lit stages in order,
  advances on raster/standard completion, busy True->False edge, or Skip; pauses
  before flagged breakpoints; Pause holds after current stage; End resets
- main_window: standard_scan_completed -> manual.on_collect_completed
- automation already pauses between samples (per-step within a sample is bounded
  by the backend automated_scan)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 17:18:30 +02:00
appleb_mandClaude Opus 4.8 bb55811781 new_gui: manual sample creates a real DB entry via /sample/manual
Replace the GUI-local placeholder with the old GUI's flow: a dialog (custom name
+ optional unit cell) builds a SampleShortInfo(db_id=-1, ...) and posts it via
DAQWorker.sample_manual -> POST /sample/manual, so the backend creates the DB
entry, assigns the db_id and sets it as current sample. Cockpit then unlocks
locally with the new sample (no robot mount; sample already on the gonio).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 16:41:11 +02:00
appleb_mandClaude Opus 4.8 02f33bd3fe new_gui: four Catppuccin flavors + lavender, Mocha default, manual mount, automation beam-rail
- theme.py: Latte/Frappe/Macchiato/Mocha registry; accent swapped mauve->lavender
  across all flavors; Mocha is the default (_saved_palette)
- top bar: ◐ theme menu (4 flavors) replacing the binary toggle; theme_selected(str)
- manual (unregistered) sample: AppState.manual_mount + ManualSample placeholder +
  'Manual sample on gonio' changer button; unlocks the cockpit with no robot
  mount/unmount (skips mount_requested/unmount_requested)
- automation Run-progress panel: vertical beam-path rail (green completed glow,
  lavender focal bloom on the running step) replacing the emoji list

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 15:50:31 +02:00
appleb_mandClaude Opus 4.8 ebd60d4c5d new_gui: Catppuccin theming (Latte/Mocha) + readability + beam-path pipeline
- retarget theme.py to Catppuccin Latte (light) + Mocha (dark)
- route on-fill text through accent_text (Mocha's light pastels need dark text);
  fixes unreadable buttons
- transport buttons: labelled + sized (Play/Pause/Skip/End were cramped glyphs)
- top-bar ☾/☀ theme toggle: live rebuild of views, backend kept, persisted to
  QSettings (wiring split into persistent vs view-facing for safe re-wire)
- beam-path pipeline signature: continuous rail, green completed segment, mauve
  focal bloom on the active station
- palette-ize stray colours (slider grooves, alert tints, state LED hues, legend)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 13:54:11 +02:00
appleb_mandClaude Opus 4.8 963af28cf4 new_gui: offline dev-seed (fake samples + status) for SIMULATED standalone
When there is no server (base_url is None), seed fake samples, a synthetic live
status (incl. a real SampleGeometryModel so bookmark/click projections work),
and a fake camera frame, so Manual mount -> pipeline/motors/bookmarks can be
tested without a backend. Gated to no-server; never affects real runs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 10:20:01 +02:00
appleb_mandClaude Opus 4.8 c09c2e31e3 new_gui bookmarks: editable labels + per-sample persistence
- each bookmark has an inline-editable label (rename signal)
- bookmarks persist per-sample via QSettings (keyed by sample db_id): saved on
  add/remove/rename, reloaded when the same sample is remounted (and across
  GUI restarts)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 09:52:49 +02:00
appleb_mandClaude Opus 4.8 05421bf944 new_gui: data-collection bookmarks (mark / go / collect-from)
Mark smargon positions during data collection (numbered markers on the camera,
projected via smargon_to_picture and tracked through rotation). Per-bookmark:
Go (move_smargon + set_omega) and Collect (rotation scan with start = bookmark,
i.e. launch data collection from that point). Cleared on unmount.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 23:05:28 +02:00
appleb_mandClaude Opus 4.8 8a5bdf142a new_gui: remove focus-measure (unused in current beamline GUI)
Stop enabling/displaying the per-frame focus metric; also lightens the camera
thread's per-frame work.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 22:53:37 +02:00
appleb_mandClaude Opus 4.8 53aeabd99e new_gui: live smargon-trace dialog + camera fast-scaling (lag fix)
- replace CSV-polling smargon trace with a live QtCharts dialog (deltaX/Y/Z +
  distance from a reference, fed by the status stream); launch from camera strip
- camera live feed uses fast (nearest) scaling instead of smooth — smooth
  rescaling every frame caused lag at low frame rates / long exposures

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 22:27:42 +02:00
appleb_mandClaude Opus 4.8 49dfb40eff new_gui: staff view + motor/camera UX edits + prediction-metrics
- Staff alignment view (3rd mode, staff only): beam location / beamstop /
  align CoR / flux measurement procedures; camera+spectrum + alignment motors
- Motors: compact SMARGON with editable Chi/Phi + Focus(Z) jog; staff-only ABR
  (GMX/GMY/GMZ) moved under SMARGON; energy removed (now staff-tools only)
- Inline camera Exp/Gain by the sample camera
- Prediction-metrics dialog from the prediction stream
- shared _wire_motors; guest overlay also covers the staff camera

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 22:09:38 +02:00
appleb_mandClaude Opus 4.8 7c22b24437 new_gui Phase 4: shortcuts, persistence, filename builder, face detection, stability
- keyboard shortcuts (mode/camera-tab/tools/help/quit) + window geometry+mode
  persistence via QSettings
- filename builder (prefix + auto-increment run) feeding scan file_prefix
- face-detection dialog (steps/step-size -> face_detection_result scatter)
- target-stability dialog (target<->beam distance + sigma)
- launch face/stability from camera tab strip
(prediction-metrics + smargon-trace deferred)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 21:42:20 +02:00
appleb_mandClaude Opus 4.8 e4dc3d505c new_gui Phase 3: staff Tools dialog (beam/sessions/recovery/local-contact/dev-help)
Staff-only Tools button -> StaffToolsDialog with 5 tabs:
- Beam/detector: beam centre/size/mark, ABR GMX/GMY/GMZ tweak + save/goto,
  mono pitch scan, change energy
- Sessions: p-group selector + open-GUI-session admin (request close / force
  remove, force/end session)
- Recovery: confirmation-code actions + maintenance/init/resync ops
- Local contact: simulation toggles, device restart, BEC macros/devices, links
- Dev help: error-code registry + last error payload

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 17:01:13 +02:00
appleb_mandClaude Opus 4.8 5b833bf9eb new_gui Phase 2: camera ML overlays, controls/screenshot, gonio/beamline video, preconditions
- camera: ML detection boxes+polygons (per-class colours), state-coloured beam
  centre marker, focus readout
- camera controls in tab strip: gain/exposure (samcam_settings), autofocus,
  screenshot-to-DB
- Gonio/Beamline tabs wired to axis IP video via VideoThread
- precondition gate (ring/shutter/hutch + 1h snooze) on scans; hutch-PSS mount
  block; sample-missing modal

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 16:51:54 +02:00
appleb_mandClaude Opus 4.8 b288c23d1f new_gui: add PyCharm run config (SIMULATED standalone)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 15:48:43 +02:00
appleb_mandClaude Opus 4.8 235559249a new_gui: redesigned PySide6 GUI (manual cockpit + automation, Phase 1)
Self-contained new package under src/aare/gui/new_gui reusing the existing
DAQWorker/PredictionSubscriber/auth without modifying them. Manual cockpit,
automation queue builder, baton controls + guest overlay, reference tools,
state LED, energy control, XRF spectrum, raster heatmap, rotation screening,
live automation progress + pause, alert banner.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 15:36:52 +02:00
appleb_m bba2f8a4c4 Merge remote-tracking branch 'origin/operation_standardisation' into operation_standardisation
Build and Publish / test (push) Successful in 2m22s
Build and Publish / build (push) Successful in 20s
Build and Publish / Build and Deploy Docs (push) Successful in 42s
2026-06-24 15:34:52 +02:00
appleb_mandClaude Opus 4.8 5370c0f168 tell_client: restore "No Pin in Gripper" detection on empty-gripper mount
Commit 071b4ab made mount() return SUCCESS as soon as it saw the intermediate
TELL "state"/Busy event, before the later "Gripper detection" event is read,
so an empty-gripper mount completed silently with no MountingFailed/pop-up.

check_command_ok blocks (wait_not_busy) until the mount sequence finishes, so
after it returns the robot's own record is authoritative: if get_mounted_sample()
is None the gripper was empty -> return NO_PIN_IN_GRIPPER, which the mounting
service maps to MountingFailed("No Pin in Gripper"). Covers manual and automation.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 15:30:08 +02:00
appleb_mandClaude Opus 4.8 47e05dc28c GUI/DAQ: hutch-safety gating, error pop-ups, and automation pause-and-wait
Fix the GUI pop-up path and add personnel-safety-system (PSS) gating so
door-open / beam-down / shutter-closed conditions are surfaced and acted on.

- exception pop-ups: connect the previously-orphaned http_error signal;
  failed user operations now raise a modal dialog, background/polling errors
  a non-modal banner.
- PSS device (devices/pss_state.py) reading EH1-PSYS PROHIBITED-STATE /
  ALARM-STATE; new critical DoorSafetyError + DOOR_SAFETY_ERROR code.
- mounting service blocks mount/unmount when the hutch is not prohibited or
  an alarm is active; /status now publishes pss_prohibited / pss_alarm.
- GUI blocks manual mount/unmount and the automation Run button immediately
  (pop-up) on door-open, and shows a warning banner while an alarm is active.
- centralise per-action precondition checks (ring current, safety shutter,
  hutch door) into one combined "continue?" dialog with a session-global
  "don't ask again for 1 hour" snooze, applied to all data-collection buttons.
- live automation pauses and auto-resumes on bad conditions (beam, shutter,
  door, robot) with continue-now / stop overrides, gated by a default-on
  "Pause on bad conditions" checkbox replacing the dead CHECK_ENABLED constant.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 15:30:08 +02:00
appleb_m a8855bfbba DAQ: added bbackup default_detector dsitances 2026-06-24 15:30:08 +02:00
appleb_m cf6c5894e0 BEC: changed the initialisation function in bec_worker.py and how certain PVS are handled: including ring_current backlight_brightness frontlight_brightness and zoom 2026-06-24 15:30:08 +02:00
appleb_mandClaude Opus 4.8 476aa69d70 data collection settings: panel-level Database/User-values toggle
Add DbOverrideLineEdit: a numeric field holding both a database value and
the user's value, driven by a per-tab Database/User-values toggle. The
user's value persists across samples, can be reverted to the database
value, and recovered again - replacing the clunky per-field checkboxes.

Fix the dtz<->resolution coupling so editing one updates the other in both
Database and User modes (previously it broke whenever a value was
overridden). Wire resolution, detector distance, transmission, exposure,
rotation total/image angle and the raster grid element size through the
new widget; other panels are untouched.

Add tests covering persist/revert/recover, the toggle's downstream emit,
the dtz/resolution coupling in both modes, and cross-sample persistence.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 15:30:08 +02:00
appleb_m 23290f9e49 daq: fixed dtecetor min and max bug if llm or hlm si missing in epics 2026-06-24 15:30:07 +02:00
appleb_m ef7d3cf157 Tell_client: fix state event handling, update tests 2026-06-24 15:30:07 +02:00
appleb_m d43218eb19 raster_grid_manager.py: fixed lag with large grid, now generates a single bitmap 2026-06-24 15:30:07 +02:00
appleb_m 8be1b0a0b5 tell: added door and remote check. 2026-06-24 15:30:07 +02:00
appleb_m ea3629d7b5 reminder to add tests for tell status chcks and other functions 2026-06-24 15:30:07 +02:00
appleb_m 8869fb26b9 update test cases for workflows, server and daq_server 2026-06-24 15:30:06 +02:00
appleb_m fab41cd40c workflows: when going to dewar transfer if tell is in pPark and get_moutn_sample is Noone don't dry. Untested! 2026-06-24 15:30:06 +02:00
appleb_m c6ac739548 portrait_mode: added a loop button to rerun the queue for debugging 2026-06-24 15:30:06 +02:00
appleb_m 746bc147a2 server: added mount checks to mount and autoamtion 2026-06-24 15:30:06 +02:00
appleb_m 50a0a4938b tell_client.py: added validate_mount_start_conditions method 2026-06-24 15:30:05 +02:00
appleb_m 680e1561e7 daq: automation log message split between success and error 2026-06-24 15:30:05 +02:00
appleb_m 7e78433974 bec_motors differ in some cases between beamline,s only a problem for logging/scilog messages 2026-06-24 15:30:05 +02:00
appleb_m c1edacc9c3 Added style sheet options - protrait style needs to be added to more places. 2026-06-24 15:30:05 +02:00
appleb_m 2fbb86df84 config, added lens_magnfiication to alter pixel_to_mm calculation 2026-06-24 15:30:05 +02:00
appleb_m 7c8e3e78a8 added portrait_mode.py 2026-06-24 15:30:04 +02:00
appleb_m f5f53a29ca operations refactor: standardised operations, added rotation operation, updated tests. 2026-06-24 15:30:04 +02:00
appleb_m 497241bb82 beamlin: renamed second BeamlineConfig to BeamlineYAMLCOnfig 2026-06-24 15:30:03 +02:00
appleb_m b4b82a59fd devices: fix on bec det_z device 2026-06-24 15:30:03 +02:00
appleb_m 793864bd39 pyproject.toml: should be sseclient not sseclient-py 2026-06-24 15:30:03 +02:00
appleb_m 454cd60825 tell: debuging. 2026-06-24 15:30:03 +02:00
appleb_m 0ad42f7f71 updated workflows test 2026-06-24 15:30:03 +02:00
appleb_m 90758fd246 better erro hadnling for status bar 2026-06-24 15:30:03 +02:00
appleb_m 770587e48a workflows.py: added safe dtz positon check 2026-06-24 15:30:02 +02:00
appleb_m f83f8bc921 yaml updates 2026-06-24 15:30:02 +02:00
appleb_m 9c0213760b detector_metadata: endpoint in sevrer was incorrect. 2026-06-24 15:30:02 +02:00