at.physics.fastring#

Functions relating to fast_ring.

Functions

fast_ring(ring[, split_inds, qpx, qpy, ...])

A fast ring consisting in the following elements.

simple_ring(energy, circumference, ...[, ...])

Generates a "simple ring" based on a given dictionary of global parameters.

fast_ring(ring, split_inds=None, qpx=None, qpy=None, detuning_coeff=None, alphac=None, emitx=None, emity=None, espread=None, keep_cavities=False, dp=None)[source]#

A fast ring consisting in the following elements.

  • a RF cavity per distinct frequency,

  • a 6x6 linear transfer map,

  • a detuning and chromaticity element,

  • a quantum diffusion element active when radiations are enabled.

A new lattices is returned with the same attributes (energy, particle, circumference, periodicity,…) as the initial one. The radiation state is also concerved. Radiations can be turned on or of using ring.disable_6d() or ring.enable_6d(). *Rad attribute will be used when radiations are turned on.

It is possible to split the original ring in multiple “fastrings” using the split_inds argument.

By default all the cavities are merged ans placed at the end of the ring this allows to minimize the number of segments and therefore lattice elements. Howevever, the longitudinal dynamics is modified by this action. In order to preserve the original RF configuration the keep_cavities argument should be set to true. In this configuration the tracking is slower as more segment are introduced.

Parameters:
  • ring – Lattice description

  • split_inds (Type[Element] | Element | Callable[[Element], bool] | str | None | int | Sequence[int] | bool | Sequence[bool] | RefptsCode) – List of indexes where to split the ring

  • qpx (Sequence[float] | None) – horizontal chromatic detuning coefficients. Default None. If specified qpy should also be provided, if not first order term computed automatically from ring. at.physics.chromaticity can be used to compute higher order chromatic coefficients

  • qpy (Sequence[float] | None) – vertical chromatic detuning coefficients. Default None. If specified qpy should also be provided, if not first order term computed automatically from ring. at.physics.chromaticity can be used to compute higher order chromatic coefficients

  • detuning_coeff (Sequence[float] | None) – First order amplitude detuning coefficients [dQx/dJx, dQx/dJy, dQy/dJy]. Default None: coefficient computer from ring. at.physics.detuning can be used to compute detuning coefficients

  • alphac (Sequence[float] | None) – Higher order momentum compaction factor. Default None. Can be Can be claculated with physics.get_mcf()

  • emitx (float | None) – Equilibrium horizontal emittance. Default is the one given by ring

  • emity (float | None) – Equilibrium vertical emittance. Default is the one given by ring

  • espread (float | None) – Equilibrium energy spread. Default is the one given by ring

  • keep_cavities (bool) – The ring will be sliced at each cavities. This allows to match longitudinal dynamics of the original ring bu t slows down the tracking as more segments are generated

Returns:

fastring (Lattice) – Fast ring lattice object

simple_ring(energy, circumference, harmonic_number, Qx, Qy, Vrf, alpha, betax=1.0, betay=1.0, alphax=0.0, alphay=0.0, dispx=0.0, dispxp=0.0, dispy=0.0, dispyp=0.0, Qpx=0.0, Qpy=0.0, A1=0.0, A2=0.0, A3=0.0, emitx=0.0, emity=0.0, espread=0.0, taux=0.0, tauy=0.0, tauz=0.0, U0=0.0, name='', particle='relativistic', TimeLag=0.0)[source]#

Generates a “simple ring” based on a given dictionary of global parameters.

A simple ring consists of:

  • an RF cavity,

  • a simple radiation damping element

  • a simplified quantum diffusion element which contains equilibrium emittance

  • a detuning and chromaticity element,

  • a 6x6 linear transfer map with no radiation damping

Parameters:
  • energy (float) – [eV]

  • circumference (float) – [m]

  • harmonic_number (float | Sequence[float]) – can be scalar or sequence of scalars. The RF frequency is derived from this and the ring circumference

  • Qx (float) – horizontal tune

  • Qy (float) – vertical tune

  • Vrf (float | Sequence[float]) – RF Voltage set point [V] - can be scalar or sequence of scalars

  • alpha (float) – momentum compaction factor

  • betax (float) – horizontal beta function [m], Default=1

  • betay (float) – vertical beta function [m], Default=1

  • alphax (float) – horizontal alpha function, Default=0

  • alphay (float) – vertical alpha function, Default=0

  • dispx (float) – horizontal dispersion [m], Default=0

  • dispxp (float) – horizontal dispersion prime, Default=0

  • dispy (float) – vertical dispersion [m], Default=0

  • dispyp (float) – vertical dispersion prime, Default=0

  • Qpx (float | Sequence[float]) – If single value, it is horizontal linear chromaticity If an array is given it corresponds to a list of horizontal non linear chromaticities [Q’,Q’’,Q’’’,…]. This is expanded following Q’/1! * (dp/p) + Q’’/2! *(dp/p)^2 etc. Default=0.0

  • Qpy (float | Sequence[float]) – If single value, it is vertical linear chromaticity If an array is given it corresponds to a list of horizontal non linear chromaticities [Q’,Q’’,Q’’’,…]. This is expanded following Q’/1! * (dp/p) + Q’’/2! *(dp/p)^2 etc. Default=0.0

  • A1 (float) – horizontal amplitude detuning coefficient, Default=0

  • A2 (float) – cross term for amplitude detuning coefficient, Default=0

  • A3 (float) – vertical amplitude detuning coefficient, Default=0

  • emitx (float) – horizontal equilibrium emittance [m.rad], Default=0 ignored if emitx=0

  • emity (float) – vertical equilibrium emittance [m.rad], Default=0 ignored if emity=0

  • espread (float) – equilibrium momentum spread, Default=0 ignored if espread=0

  • taux (float) – horizontal radiation damping time [turns], Default=0 ignored if taux=0

  • tauy (float) – vertical radiation damping time [turns], Default=0 ignored if tauy=0

  • tauz (float) – longitudinal radiation damping time [turns], Default=0 ignored if tauz=0

  • U0 (float) – energy loss [eV] (positive number), Default=0

  • name (str) – Name of the lattice

  • particle (str | Particle) – circulating particle. May be ‘relativistic’, ‘electron’, ‘positron’, ‘proton’ or a Particle object

  • TimeLag (float | Sequence[float]) – Set the timelag of the cavities, Default=0. Can be scalar or sequence of scalars (as with harmonic_number and Vrf).

If the given emitx, emity or espread is 0, then no equlibrium emittance is applied in this plane. If the given tau is 0, then no radiation damping is applied for this plane.

Returns:

ring – Simple ring