Merged
Conversation
Closed
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for betatron tune monitoring by introducing a new BetatronTuneMonitor diagnostic device that abstracts tune measurement from both simulators and control systems. The implementation allows tests to use a unified interface for accessing betatron tune values rather than calling get_lattice().get_tune() directly.
Key changes:
- Introduces
BetatronTuneMonitorclass in a new diagnostics module - Adds
RBetatronTuneArrayimplementations for both simulator and control system contexts - Updates existing tune tests to use the new tune monitor interface
- Adds dedicated test file for tune monitor functionality
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| pyaml/diagnostics/tune_monitor.py | New file defining BetatronTuneMonitor class with tune access interface |
| pyaml/lattice/abstract_impl.py | Adds simulator-side RBetatronTuneArray implementation that reads from lattice |
| pyaml/control/abstract_impl.py | Adds control system-side RBetatronTuneArray implementation that reads from Tango attributes |
| pyaml/lattice/simulator.py | Integrates BetatronTuneMonitor into simulator device registration |
| pyaml/control/controlsystem.py | Integrates BetatronTuneMonitor into control system device registration |
| pyaml/common/element_holder.py | Adds storage and accessor methods for tune monitor devices |
| tests/test_tune_monitor.py | New test file validating tune monitor functionality for both simulator and control system |
| tests/test_tune.py | Updated to use tune monitor instead of direct lattice access |
| tests/test_tune_hardware.py | Updated to use tune monitor instead of direct lattice access |
| tests/config/tune_monitor.yaml | Configuration file for tune monitor tests |
| tests/config/EBSTune.yaml | Adds tune monitor device configuration |
Comments suppressed due to low confidence (2)
pyaml/common/element_holder.py:71
- This assignment to 'get_bpm' is unnecessary as it is redefined before this value is used.
def get_bpm(self,name:str) -> Element:
pyaml/common/element_holder.py:76
- This assignment to 'add_bpm' is unnecessary as it is redefined before this value is used.
def add_bpm(self,name:str,bpm:Element):
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
JeanLucPons
previously approved these changes
Nov 4, 2025
Contributor
JeanLucPons
left a comment
There was a problem hiding this comment.
Thanks for the update.
Try to use relative import path.
JeanLucPons
approved these changes
Nov 5, 2025
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.
Implements #20 (comment). The main purpose is to have a control system abstraction to measure the tune. Now we should be able to perform a tune response matrix measurement with a control system rather than a simulator. This will also allow the implementation and testing of use cases (that need tune measurement) on a real machine.