slactrac.BeamParams

class slactrac.BeamParams(beta=None, alpha=None, emit=None, emit_n=None, gamma_en=None, spotsize=None, divergence=None, r=None, avg_xxp=None)[source]

Calculates Courant-Snyder parameters and beam properties in a self-consistent manner.

Parameters:

beta : float

Beta function value in meters.

alpha : float

Alpha function value.

emit : float

Emittance in SI units.

emit_n : float

Normalized emittance in SI units.

gamma_en : float

Relativistic gamma \gamma

spotsize : float

RMS of x coordinate.

divergence : float

RMS of x' coordinate.

r : float

The average correlation of x and x'.

avg_xxp : float

The average correlation of x and x'.

Attributes

T The beam T matrix.
alpha The alpha function of the beam.
avg_xxp The average of coordinates x and x'.
beta The beta function of the beam.
betastar The minimum beta function of the beam in vacuum.
divergence The divergence of the beam.
gamma The gamma function of the beam
minspotsize The RMS size of the beam at its smallest in vacuum.
spotsize The RMS size of the beam.
sstar The distance from the minimum beta function of the beam in vacuum.

Methods

set_emit_n(emit_n, gamma) Set the normalized emittance of the beam.
transport(R) Given a transport matrix R, return the new beam parameters.