Skip to content

20 feature implement tunemonitor#51

Merged
JeanLucPons merged 4 commits intomainfrom
20-feature-implement-tunemonitor
Nov 5, 2025
Merged

20 feature implement tunemonitor#51
JeanLucPons merged 4 commits intomainfrom
20-feature-implement-tunemonitor

Conversation

@gubaidulinvadim
Copy link
Contributor

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.

@gubaidulinvadim gubaidulinvadim self-assigned this Nov 4, 2025
@gubaidulinvadim gubaidulinvadim added the enhancement New feature or request label Nov 4, 2025
@gubaidulinvadim gubaidulinvadim linked an issue Nov 4, 2025 that may be closed by this pull request
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 BetatronTuneMonitor class in a new diagnostics module
  • Adds RBetatronTuneArray implementations 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
JeanLucPons previously approved these changes Nov 4, 2025
Copy link
Contributor

@JeanLucPons JeanLucPons left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update.
Try to use relative import path.

@JeanLucPons JeanLucPons merged commit 525cda5 into main Nov 5, 2025
2 checks passed
@JeanLucPons JeanLucPons deleted the 20-feature-implement-tunemonitor branch November 5, 2025 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement TuneMonitor

2 participants