at.physics.radiation#

Radiation and equilibrium emittances

Functions

ohmi_envelope(ring[, refpts, orbit, ...])

Calculates the equilibrium beam envelope

get_radiation_integrals(ring[, dp, twiss])

Computes the 5 radiation integrals for uncoupled lattices.

quantdiffmat(ring[, orbit])

Computes the diffusion matrix of the whole ring

gen_quantdiff_elem(ring[, orbit])

Generates a quantum diffusion element

tapering(ring[, multipoles, niter])

Scales magnet strengths

gen_quantdiff_elem(ring, orbit=None)[source]#

Generates a quantum diffusion element

Parameters:
  • ring (Lattice) – Lattice description. Radiation must be ON

  • orbit (ndarray) – Avoids looking for initial the closed orbit if it is already known ((6,) array).

Returns:

diffElem (QuantumDiffusion) – Quantum diffusion element

get_radiation_integrals(ring, dp=None, twiss=None, **kwargs)[source]#

Computes the 5 radiation integrals for uncoupled lattices.

Parameters:
  • ring – Lattice description

  • twiss – Linear optics at all points (from linopt6()). If None, it will be computed.

Keyword Arguments:
  • dp (float) – Momentum deviation. Defaults to None

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

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

  • method (Callable) –

    Method for linear optics:

    linopt2: no longitudinal motion, no H/V coupling,

    linopt6 (default): with or without longitudinal motion, normal mode analysis

Returns:
  • i1 (float) – Radiation integrals - \(I_1 \quad [m]\)

  • i2 (float) – \(I_2 \quad [m^{-1}]\)

  • i3 (float) – \(I_3 \quad [m^{-2}]\)

  • i4 (float) – \(I_4 \quad [m^{-1}]\)

  • i5 (float) – \(I_5 \quad [m^{-1}]\)

ohmi_envelope(ring, refpts=None, orbit=None, keep_lattice=False)[source]#

Calculates the equilibrium beam envelope

Computation based on Ohmi’s beam envelope formalism [1]

Parameters:
Returns:
  • emit0 (numpy.recarray) – Emittance data at the start/end of the ring

  • beamdata (numpy.recarray) – Beam parameters at the start of the ring

  • emit (numpy.recarray) – Emittance data at the points selected to by refpts

emit is a record array with the following fields:

r66

(6, 6) equilibrium envelope matrix R

r44

(4, 4) betatron emittance matrix (dpp = 0)

m66

(6, 6) transfer matrix from the start of the ring

orbit6

(6,) closed orbit

emitXY

(2,) betatron emittance projected on xxp and yyp

emitXYZ

(3,) 6x6 emittance projected on xxp, yyp, ldp

Values given at the entrance of each element specified in refpts.

Field values can be obtained with either emit['r66'] or emit.r66

beamdata is a record array with the following fields:

tunes

tunes of the 3 normal modes

damping_rates

damping rates of the 3 normal modes

mode_matrices

R-matrices of the 3 normal modes

mode_emittances

equilibrium emittances of the 3 normal modes

References

quantdiffmat(ring, orbit=None)[source]#

Computes the diffusion matrix of the whole ring

Parameters:
  • ring (Lattice) – Lattice description. Radiation must be ON

  • orbit (ndarray) – Avoids looking for initial the closed orbit if it is already known ((6,) array).

Returns:

diffmat (ndarray) – Diffusion matrix (6,6)

tapering(ring, multipoles=True, niter=1, **kwargs)[source]#

Scales magnet strengths

Scales magnet strengths with local energy to cancel the closed orbit and optics errors due to synchrotron radiations. The dipole bending angle is changed by changing the reference momentum. This is the ideal tapering scheme where magnets and multipoles components (PolynomB and PolynomA) are scaled individually.

Warning

This method works only for lattices without errors and corrections: if not all corrections and field errors will also be scaled !!!

Parameters:
  • ring (Lattice) – Lattice description

  • multipoles (bool) – Scales all multipoles

  • niter (int) – Number of iteration

Keyword Arguments: