Repository navigation
Slits: report blade progress with WatchableAsyncStatus - #95
Merged
Anthony Sligar (sligara7) merged 1 commit intoOct 7, 2026
Merged
Conversation
Slits.set and the gap/center setters now use WatchableAsyncStatus.wrap and forward each blade motor's watcher updates (forward_watcher_updates, combine=False), as DCLM.set does, so progress bars and the GUI see slit moves. Assisted-by: copilot:claude-opus-4-8
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused changes preserve movement calculations and sequencing, with regression coverage and no identified blocking issues.
0 open findings
What changed in this PR
Adds blade-level progress reporting to slit moves while preserving gap-first, center-second movement sequencing.
Changes:
- Uses watchable statuses and forwards individual blade updates.
- Calls gap and center setters directly to preserve watcher support.
- Adds a mock test confirming progress reports from all four blades.
| File | Description |
|---|---|
| tests/photon_delivery_system/test_slits.py | Tests watcher updates from all four blades. |
| src/hextools/photon_delivery_system/slits.py | Forwards blade progress through watchable slit-move statuses. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Slits.set, and the setters behindhorizontal_gap/vertical_gap/horizontal_center/vertical_center, now use@WatchableAsyncStatus.wrapinstead of@AsyncStatus.wrap, forwarding each blade motor's watcher updates withforward_watcher_updates(..., combine=False), the same pattern asDCLM.setindclm.py. Progress bars and the hextools GUI's device-progress panel can then follow slit moves.Behaviour is otherwise unchanged: gaps are set first (holding centers), then centers (holding gaps).
Slits.setnow calls the gap/center setters directly rather than through the derived signals, because a signal'sset()returns a plainAsyncStatuswith no watchers.Verification: mock tests only (ophyd-async mock motors). New
test_slits_set_reports_blade_progress_to_watchersfailed first ('AsyncStatus' object has no attribute 'watch') and passes now; all 8 tests intests/photon_delivery_system/test_slits.pypass; ruff check/format clean. Not yet tried on the simulated or real beamline.