phase_space_beam_parameters module
Handle the beam parameters of a single phase space.
For a list of the units associated with every parameter, see Units and conventions.
Note
In this module, angles are stored in deg, not in rad!
- class PhaseSpaceBeamParameters(phase_space_name, eps_no_normalization, eps_normalized, envelopes=None, twiss=None, sigma=None, tm_cumul=None, mismatch_factor=None)[source]
Bases:
IPhaseSpaceBeamParametersHold Twiss, emittance, envelopes of a single phase-space.
- Parameters:
- classmethod from_cumulated_transfer_matrices(phase_space_name, sigma_in, tm_cumul, gamma_kin, beta_kin, beam_kwargs)[source]
Compute \(\sigma\) matrix, and everything from it.
- classmethod from_sigma(phase_space_name, sigma, gamma_kin, beta_kin, beam_kwargs, **kwargs)[source]
Compute Twiss, eps, envelopes just from sigma matrix.
- classmethod from_other_phase_space(other_phase_space, phase_space_name, gamma_kin, beta_kin, beam_kwargs, **kwargs)[source]
Fully initialize from another phase space.
- classmethod from_averaging_x_and_y(phase_space_name, x_space, y_space)[source]
Create average transverse phase space from [xx’] and [yy’].
epsis always initialized.mismatch_factoris calculated if it was already calculated inx_spaceandy_space.- Parameters:
phase_space_name (
str)x_space (
Self)y_space (
Self)
- Return type:
Self
- __init__(phase_space_name, eps_no_normalization, eps_normalized, envelopes=None, twiss=None, sigma=None, tm_cumul=None, mismatch_factor=None)
- _abc_impl = <_abc._abc_data object at 0x73dca86e6380>
- set_mismatch(reference_phase_space, reference_z_abs, z_abs, raise_missing_twiss_error=True, **mismatch_kw)[source]
Compute and set the mismatch with
reference_phase_space.- Parameters:
reference_phase_space (
Self) – Beam parameters in the same phase space, corresponding to the reference linac.reference_z_abs (
ndarray) – Positions corresponding toreference_phase_space.z_abs (
ndarray) – Positions in the linac under study.raise_missing_twiss_error (
bool, default:True) – If set to True and the Twiss parameters were not calculated in current phase space, raise an error.mismatch_kw (
bool) – Keyword arguments passed to the function computing mismatch factor.
- Return type: