beam_parameters_factory module
Define a function to generate a BeamParameters for TraceWin.
- class BeamParametersFactoryTraceWin(is_3d: bool, is_multipart: bool)
Bases:
BeamParametersFactoryA class holding method to generate
BeamParameters.- factory_method(z_abs: ndarray, gamma_kin: ndarray, results: dict[str, ndarray], element_to_index: Callable[[str | Element, str | None], int | slice]) BeamParameters
Create the
BeamParametersobject.
- _extract_phase_space_data_for_sigma(phase_space_name: Literal['x', 'y', 'zdelta'], results: dict[str, ndarray]) tuple[ndarray, ndarray, ndarray]
Retrieve the data necessary to reconstruct \(\sigma\) beam matrix.
- Parameters:
phase_space_name (Literal["x", "y", "zdelta"]) – Name of a single phase space.
results (dict[str, numpy.ndarray]) – Results dictionary, which keys are
tracewin.outorpartran1.outheaders and which values are corresponding data.
- Returns:
sigma_00 (numpy.ndarray) –
(n, )array containing top-left component of the \(\sigma\) beam matrix.sigma_01 (numpy.ndarray) –
(n, )array containing top-right component of the \(\sigma\) beam matrix.eps_normalized (numpy.ndarray) –
(n, )array of normalized emittance.
- _extract_emittance_for_99percent(phase_space_name: Literal['x99', 'y99', 'phiw99'], results: dict[str, ndarray]) ndarray
Retrieve the 99% emittances.
Todo
normalized or not???
- Parameters:
phase_space_name (Literal["x99", "y99", "phiw99"]) – Name of a single phase space.
results (dict[str, numpy.ndarray]) – Results dictionary, which keys are
tracewin.outorpartran1.outheaders and which values are corresponding data.
- Returns:
eps – 99% emittance in the desired phase space.
- Return type:
- _abc_impl = <_abc._abc_data object at 0x7fd3cd317200>