at.physics.revolution#

Functions

get_mcf(ring[, dp, keep_lattice, fit_order, ...])

Compute the momentum compaction factor \(\alpha\)

get_slip_factor(ring, **kwargs)

Compute the slip factor \(\eta\)

get_revolution_frequency(ring[, dp, dct, df])

Compute the revolution frequency of the full ring [Hz]

set_rf_frequency(ring[, frequency, dp, dct, df])

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_6d must be False)

  • dp (float | None) – Momentum deviation. Defaults to None

  • keep_lattice (bool) – Assume no lattice change since the previous tracking. Default: False

  • fit_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]

Parameters:
  • ring (Lattice) – Lattice description

  • dp (float | None) – Momentum deviation. Defaults to None

  • dct (float | None) – Path lengthening. Defaults to None

  • df (float | None) – Deviation of RF frequency. Defaults to None

Returns:

frev – Revolution frequency [Hz]

get_slip_factor(ring, **kwargs)[source]#

Compute the slip factor \(\eta\)

Parameters:

ring (Lattice) – Lattice description (ring.is_6d must be False)

Keyword Arguments:
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:
  • ring (Lattice) – Lattice description

  • frequency (float | None) – RF frequency [Hz]. Default: nominal frequency.

  • dp (float | None) – Momentum deviation. Defaults to None

  • dct (float | None) – Path lengthening. Defaults to None

  • df (float | None) – Deviation of RF frequency. Defaults to None

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