util.synchronous_phases module
Define various functions to compute the synchronous phase.
- SYNCHRONOUS_PHASE_FUNCTIONS = {'historical': <function phi_s_legacy>, 'lagniel': <function phi_s_lagniel>, 'legacy': <function phi_s_legacy>, 'tracewin': <function phi_s_from_tracewin_file>}
- phi_s_from_tracewin_file(simulation_output: object, *args, **kwargs) tuple[float, float]
Get the synchronous phase from a TraceWin output file.
It is up to you to edit the
tracewin.ini
file in order to have the synchronous phase that you want.
- phi_s_lagniel(simulation_output: object, *args, **kwargs) tuple[float, float]
Compute cavity parameters with phi_s model proposed by JM Lagniel.
See Longitudinal beam dynamics at high accelerating fields, what changes? ROSCOFF 2021.
- Parameters:
transf_mat_21 (float) – (2, 1) component of the field map transfer matrix.
delta_w_kin (float) – Energy gained by the synchronous particle in the cavity.
- Returns:
phi_s – Corrected synchronous phase of the cavity.
- Return type:
float
- phi_s_legacy(integrated_field: complex | None, *args, **kwargs) tuple[float, float]
Compute the cavity parameters with phi_s historical definition.
- Parameters:
integrated_field (complex | None) – Complex electric field felt by the synchronous particle. It is None if the cavity is failed.
- Returns:
v_cav_mv (float) – Accelerating voltage in MV. It is
np.nan
ifintegrated_field
is None.phi_s (float) – Synchronous phase of the cavity in rad. It is
np.nan
ifintegrated_field
is None.