element_envelope3d_parameters module
Define a class to hold solver parameters for Envelope3D.
This module holds ElementEnvelope3DParameters, that inherits
from the Abstract Base Class ElementBeamCalculatorParameters.
It holds the transfer matrix function that is used, as well as the meshing in
accelerating elements.
In a first time, only Runge-Kutta (no leapfrog) and only Python (no Cython).
The list of implemented transfer matrices is PARAMETERS_3D.
- class ElementEnvelope3DParameters(transf_mat_function: Callable, length_m: float, n_steps: int, **kwargs)
Bases:
ElementEnvelope1DParametersHold the parameters to compute beam propagation in an
Element.has and get method inherited from ElementCalculatorParameters parent class.
- __init__(transf_mat_function: Callable, length_m: float, n_steps: int, **kwargs) None
Save useful parameters as attribute.
- abstract transfer_matrix_arguments() Sequence[Any]
Give the element parameters necessary to compute transfer matrix.
- _transfer_matrix_results_to_dict(transfer_matrix: ndarray, gamma_phi: ndarray, integrated_field: float | None) dict
Convert the results given by the transf_mat function to dict.
- _transfer_matrix_results_to_dict_broken_field_map(transfer_matrix: ndarray, gamma_phi: ndarray, itg_field: float | None) dict
Convert the results given by the transf_mat function to dict.
This method should override the default
_transfer_matrix_results_to_dictwhen the element under study is a broken field map.
- re_set_for_broken_cavity()
Change solver parameters for efficiency purposes.
- _abc_impl = <_abc._abc_data object at 0x7fd3cd84ab80>
- class DriftEnvelope3DParameters(transf_mat_module: ModuleType, elt: Drift | FieldMap, n_steps: int = 1, **kwargs: str)
Bases:
ElementEnvelope3DParametersHold the properties to compute transfer matrix of a
Drift.- __init__(transf_mat_module: ModuleType, elt: Drift | FieldMap, n_steps: int = 1, **kwargs: str) None
Create the specific parameters for a drift.
- transfer_matrix_arguments() tuple[float, int]
Give the element parameters necessary to compute transfer matrix.
- _abc_impl = <_abc._abc_data object at 0x7fd3cd72e6c0>
- class QuadEnvelope3DParameters(transf_mat_module: ModuleType, elt: Quad, n_steps: int = 1, **kwargs: str)
Bases:
ElementEnvelope3DParametersHold the properties to compute transfer matrix of a
Quad.- __init__(transf_mat_module: ModuleType, elt: Quad, n_steps: int = 1, **kwargs: str) None
Create the specific parameters for a drift.
- transfer_matrix_arguments() tuple[float, float]
Give the element parameters necessary to compute transfer matrix.
- _abc_impl = <_abc._abc_data object at 0x7fd3cd72e740>
- class SolenoidEnvelope3DParameters(transf_mat_module: ModuleType, elt: Solenoid, n_steps: int = 1, **kwargs: str)
Bases:
ElementEnvelope3DParametersHold the properties to compute transfer matrix of a
Quad.- __init__(transf_mat_module: ModuleType, elt: Solenoid, n_steps: int = 1, **kwargs: str) None
Create the specific parameters for a drift.
- _abc_impl = <_abc._abc_data object at 0x7fd3cda27fc0>
- class FieldMapEnvelope3DParameters(transf_mat_module: ModuleType, elt: FieldMap, method: str, n_steps_per_cell: int, solver_id: str, phi_s_model: str = 'historical', **kwargs: str)
Bases:
ElementEnvelope3DParametersHold the properties to compute transfer matrix of a
FieldMap.Non-accelerating cavities will use
DriftEnvelope3DParametersinstead.- __init__(transf_mat_module: ModuleType, elt: FieldMap, method: str, n_steps_per_cell: int, solver_id: str, phi_s_model: str = 'historical', **kwargs: str) None
Create the specific parameters for a drift.
- transfer_matrix_arguments() tuple[float, int]
Give the element parameters necessary to compute transfer matrix.
- _transfer_matrix_results_to_dict(transfer_matrix: ndarray, gamma_phi: ndarray, integrated_field: float | None) dict
Convert the results given by the transf_mat function to dict.
Overrides the default method defined in the ABC.
- _abc_impl = <_abc._abc_data object at 0x7fd3cd72e800>
- class BendEnvelope3DParameters(transf_mat_module: ModuleType, elt: Bend, n_steps: int = 1, **kwargs: str)
Bases:
ElementEnvelope3DParametersHold specific parameters to compute
Bendtransfer matrix.- __init__(transf_mat_module: ModuleType, elt: Bend, n_steps: int = 1, **kwargs: str)
Instantiate object and pre-compute some parameters for speed.
- Parameters:
transf_mat_module (types.ModuleType) – Module where the transfer matrix function is defined.
elt (Bend) –
BENDelement.kwargs – kwargs
- _abc_impl = <_abc._abc_data object at 0x7fd3cd72e880>