acceptance module
Define functions related to acceptance calculation.
Todo
Show equations and references in the docstrings.
- compute_acceptances(phi_s, freq_cavity_mhz, w_kin, v_cav_mv, length_m, beam_kwargs)[source]
Compute acceptances in phase and energy.
Handles off-limits synchronous phases.
- Parameters:
phi_s (
float) – Synchronous phase; if it is outside \((-\pi / 2,~0)\), both acceptances arenan.freq_cavity_mhz (
float) – Cavity frequency in \(\mathrm{MHz}\).w_kin (
float|None) – Beam energy at the cavity exit in \(\mathrm{MeV}\).v_cav_mv (
float) – Cavity accelerating voltage in \(\mathrm{MV}\).length_m (
float) – Cavity length in \(\mathrm{m}\).beam_kwargs (
BeamKwargs) – Dict holding beam parameters, and in particular the adimensionned chargeq_adimand the rest energye_rest_mev.
- Return type:
- Returns:
acceptance_phi – Acceptance in phase in \(\mathrm{rad}\).
acceptance_energy – Acceptance in energy in \(\mathrm{MeV}\).
- _compute_acceptance_energy(phi_s, freq_cavity_mhz, w_kin, v_cav_mv, length_m, q_adim, e_rest_mev, **beam_kwargs)[source]
Compute the acceptance in energy.
- Parameters:
phi_s (
float) – Synchronous phase, must be in \((-\pi / 2,~0)\).freq_cavity_mhz (
float) – Cavity frequency in \(\mathrm{MHz}\).w_kin (
float) – Beam energy at the cavity exit in \(\mathrm{MeV}\).v_cav_mv (
float) – Cavity accelerating voltage in \(\mathrm{MV}\).length_m (
float) – Cavity length in \(\mathrm{m}\).q_adim (
float) – Beam adimensionned charge.e_rest_mev (
float) – Beam rest energy in \(\mathrm{MeV}\).
- Return type:
- Returns:
Cavity acceptance in energy, in \(\mathrm{MeV}\).