Conversation
|
To me this is a bit confusing, a masterclock does not control the RF voltage. |
@gupichon I agree with @JeanLucPons , I wrote the same thing in a linked issue a few days ago. |
This comment was marked as resolved.
This comment was marked as resolved.
|
Concerning the voltage (or rather the power) of the masterclock, it is tuned to ensure that the signal goes through all cables to be detected by all low level RF elements. Then the RF voltage in various cavity (booster or SR) is regulated by the RF transmitters that include their own low level RF element. So the masterclock power tuning is rather for RF specialist and not for accelerator physicists. To me it should not be in pyAML. |
|
To me the I think we should have a Both of these different elements could share the |
|
The actual RF holder provides: sr.live.rf.frequency.set(...) # Set main RF freq (the one of the DEFAULT_RF_PLANT, for powered harmonic cav you should pass by its transmitter)
sr.live.rf.voltage.set(...) # Set the total RF voltage of all main RF freq (not including powered harmonic cav)
sr.live.rf.transmitter.get("TRA1").voltage.set(...) # Set the voltage of cavities powered by TRA1
sr.live.rf.transmitter.get("TRA1").phase.set(...) # Set the phase of cavities powered by TRA1Edit: |
|
Thanks everyone for the feedback. If I understand correctly, I should just revert voltage back to how it was before this PR, and we'll design a separate cavity feature later to cover voltage/phase. Is that right? |
|
@gupichon I think this PR could just be closed. Presently the rf.frequency.get() should already be the masterclock frequency. |
|
I add that if you have a transmitter that power several cavities and that you need to set phase for each individual cavities this is not possible in pyAML for the moment. For us, we will need this four our transition from klystron (10 cavities) to SSA (1 cavity) but this is rather for RF specialists to ensure good phase between main RF cavities and should not be a part of pyaml. |
|
Got it, I'm closing it now. Thanks for the review. |
Description
Adds
RFHolder.masterclock, returning theRFPlantconfigured asDEFAULT_RF_PLANT, making the default RF plant explicit.frequency/voltagebecome backward-compatible aliases formasterclock.frequency/masterclock.voltageinstead of duplicating theDEFAULT_RF_PLANTlookup.Related Issue
Features/issues described there are:
rf.masterclockwas added as a property delegating to the existingget("DEFAULT_RF_PLANT")— no new lookup/error logic needed, sinceElementHolder._get()already raisesPyAMLExceptionwhen the name is absent (same convention already used forchromaticity/tune/orbit/etc.).Changes to existing functionality
RFHolder.frequency/RFHolder.voltage: reimplemented to delegate toself.masterclock.frequency/self.masterclock.voltageinstead of callingself.get("DEFAULT_RF_PLANT")directly, to avoid duplicating the literal name in two places. Behavior and return values are unchanged for existing callers.Testing
The following tests (compatible with pytest) were added to
tests/rf/test_rf.py:test_masterclock_returns_the_default_rf_planttest_frequency_and_voltage_are_masterclock_aliasestest_masterclock_raises_when_default_rf_plant_missingtest_simple_rf_accessVerify that your checklist complies with the project
tests/tuning_tools/test_tuning_orm.py, a Windows-onlyNamedTemporaryFiledouble-open issue)masterclockis discoverable viahelp(sr.live.rf))