Skip to content

Feature: Add an RF masterclock facade #374

Description

@gupichon

Description, motivation and use case
RFHolder already resolves named RF plants and exposes frequency and voltage from DEFAULT_RF_PLANT. The original holder proposal expresses this default RF plant as rf.masterclock, which makes its role explicit and leaves room for other RF plants under the same holder.

This improves readability in control applications that operate on the machine master clock while still supporting named RF plants.

Proposed solution
Add rf.masterclock, returning the RF plant configured as DEFAULT_RF_PLANT:

  • rf.masterclock.frequency exposes its frequency access.
  • rf.masterclock.voltage exposes its total-voltage access.
  • rf.get(name) continues to resolve other RF plants by name.

Retain rf.frequency and rf.voltage as backward-compatible aliases for the corresponding masterclock accessors. Raise a clear PyAMLException when DEFAULT_RF_PLANT is absent.

Describe alternatives you've considered
Keeping only rf.frequency and rf.voltage is compact but hides which configured RF plant they refer to. Making masterclock a separate object would duplicate the RFPlant API and create unnecessary synchronization concerns.

Example

masterclock = sr.live.rf.masterclock
masterclock.frequency.set(499.654e6)
masterclock.voltage.set(2.5e6)

same_frequency = sr.live.rf.frequency
spare_rf_plant = sr.live.rf.get("SPARE_RF_PLANT")

Additional context
Parent issue: ElementHolder API refurbishment #199.

The current RFHolder already implements get(name), frequency, and voltage. This issue introduces the explicit default-plant façade proposed in #199 while retaining the current shortcuts.

Checklist

  • I've assigned this issue to a project
  • I've @-mentioned relevant people

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions