Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a motor-motion-driven update path for SimMonitor so its computed readback can refresh automatically when the configured reference motor moves.
Changes:
- Add a motor subscription mechanism in
SimMonitor(setup_readback_monitor/_update_readback) to trigger monitor readback updates on motor motion. - Extend
SimulatedDataMonitorto register the motor callback when models/params are selected/updated. - Update the monitor readback test to construct a
SimPositionerand assert that monitor subscriptions fire after motor motion.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
ophyd_devices/sim/sim_monitor.py |
Introduces motor subscription plumbing to trigger monitor updates on motor motion. |
ophyd_devices/sim/sim_data.py |
Hooks motor callback registration into monitor sim model selection/parameter updates; refactors param-setting helper. |
tests/test_simulation.py |
Adjusts monitor readback test to use a simulated motor and adds a callback-on-motion assertion. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
wakonig
reviewed
Apr 7, 2026
fb18e92 to
2511557
Compare
6265e76 to
4c14fa7
Compare
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
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.
LIttle PR to fix a thread leak for the
movemethod of SimPositioner, and have SimMonitor to register a callback on any change of readback from the ref_motor.