at.physics.revolution#
Functions
|
Compute the momentum compaction factor \(\alpha\) |
|
Compute the slip factor \(\eta\) |
|
Compute the revolution frequency of the full ring [Hz] |
|
Set the RF frequency |
- get_mcf(ring, dp=0.0, keep_lattice=False, fit_order=1, n_step=2, **kwargs)[source]#
Compute the momentum compaction factor \(\alpha\)
- Parameters:
ring (Lattice) – Lattice description (
ring.is_6dmust beFalse)keep_lattice (bool) – Assume no lattice change since the previous tracking. Default:
Falsefit_order (int | None) – Maximum momentum compaction factor order to be fitted. Default to 1, corresponding to the first-order momentum compaction factor.
n_step (int | None) – Number of different calculated momentum deviations to be fitted with a polynomial. Default to 2.
- Keyword Arguments:
DPStep (Optional[float]) – Momentum step size. Default:
DConstant.DPStep- Returns:
mcf (float/array) – Momentum compaction factor \(\alpha\) up to the order fit_order. Returns a float if fit_order=1 otherwise returns an array.
- get_revolution_frequency(ring, dp=None, dct=None, df=None)[source]#
Compute the revolution frequency of the full ring [Hz]
- get_slip_factor(ring, **kwargs)[source]#
Compute the slip factor \(\eta\)
- Parameters:
ring (Lattice) – Lattice description (
ring.is_6dmust beFalse)- Keyword Arguments:
dp (float) – Momentum deviation
DPStep (float) – Momentum step size. Default:
DConstant.DPStep
- Returns:
eta (float) – Slip factor \(\eta\)
- set_rf_frequency(ring, frequency=None, dp=None, dct=None, df=None, **kwargs)[source]#
Set the RF frequency
- Parameters:
- Keyword Arguments:
cavpts (Optional[Refpts]) – If
None, look for ring.cavpts, or otherwise take all cavities.array (Optional[bool]) –
If
False(default), frequency is applied to the selected cavities with the lowest frequency. The frequency of all the other selected cavities is scaled by the same ratio.If
True, directly apply frequency to the selected cavities. The value must be broadcastable to the number of cavities.copy (Optional[bool]) – If
True, returns a shallow copy of ring with new cavity elements. Otherwise (default), modify ring in-place