ellipse module
Define specific functions to plot emittance ellipses.
Todo
Isometric view of emittance along the linac. Possibility to visualize a single particle trajectory along the emittance. Visualization of the acceptance.
- class EllipseEqParams
Bases:
TypedDictHolds all the parameters to compute an emittance ellipse.
..math:
Ax**2 + Bxy + Cy**2 + Dx + Ey + F = 0
- _compute_ellipse_parameters(ell_eq: EllipseEqParams)
Compute the ellipse parameters so as to plot the ellipse.
- Parameters:
ell_eq (EllipseEqParams) – Holds ellipe equations parameters.
- Returns:
ell_param – Holds semi axis, center of ellipse, angle.
- Return type:
- plot_ellipse(ax: Axes, ell_eq: EllipseEqParams, **plot_kwargs)
Plot the ellipse defined by
ell_eqonax.
- plot_ellipse_emittance(ax: Axes, accelerator: Accelerator, idx: int, phase_space: Literal['zdelta', 'z', 'phiw', 'x', 'y', 't', 'phiw99', 'x99', 'y99'])
Plot the emittance ellipse and highlight interesting data.