slactrac.PWFA.EllipseBeam

class slactrac.PWFA.EllipseBeam(nb0, E=20.35, dE=0.01, sx=None, sxp=None, sxxp=None, beta=None, alpha=None, emit=None, emit_n=None)[source]

Creates an ellipsoidal beam.

Either the set of parameters sx, sxp, and sxxp must be used; or beta, alpha, and emit or emit_n must be used.

Parameters:

nb0 : float

On-axis beam density.

E : float

Beam energy in GeV.

dE : float

Beam energy spread.

sx : float, optional

Beam moment where \text{sx}^2 = \langle x^2 \rangle.

sxp : float, optional

Beam moment where \text{sxp}^2 = \langle x'^2 \rangle.

sxxp : float, optional

Beam moment where \text{sxxp} = \langle x x' \rangle.

beta : float, optional

Courant-Snyder parameter \beta.

alpha : float, optional

Courant-Snyder parameter \alpha.

emit : float, optional

Beam emittance \epsilon.

emit_n : float, optional

Normalized beam emittance \gamma \epsilon.

Attributes

E Beam energy in GeV.
alpha Courant-Snyder parameter \alpha.
beta Courant-Snyder parameter \beta.
dE Beam energy spread.
emit Beam emittance \epsilon.
emit_n Normalized beam emittance \gamma \epsilon.
nb0 On-axis beam density.
sx Beam moment where \text{sx}^2 = \langle x^2 \rangle.
sxp Beam moment where \text{sxp}^2 = \langle x'^2 \rangle.
sxxp Beam moment where \text{sxxp} = \langle x x' \rangle.

Methods

set_Courant_Snyder(beta, alpha[, emit, emit_n]) Sets the beam moments indirectly using Courant-Snyder parameters.
set_moments(sx, sxp, sxxp) Sets the beam moments directly.