core.elements.field_maps.cavity_settings_factory module
Create CavitySettings
from various contexts.
- class CavitySettingsFactory(freq_bunch_mhz: float)
Bases:
object
Base class to create
CavitySettings
objects.- __init__(freq_bunch_mhz: float) None
Instantiate factory, with attributes common to all cavities.
- _reference(absolute_phase_flag: bool, set_sync_phase: bool) str
Determine which phase will be the reference one.
- from_line_in_dat_file(line: list[str], set_sync_phase: bool = False) CavitySettings
Create the cavity settings as read in the
.dat
file.
- from_optimisation_algorithm(base_settings: Sequence[CavitySettings], var: ndarray, reference: str, status: str) list[CavitySettings]
Create the cavity settings to try during an optimisation.
- from_other_cavity_settings(cavity_settings: Sequence[CavitySettings], reference: str = '') list[CavitySettings]
Create a copy of
cavity_settings
, reference can be updated.Not used for the moment.