beam_parameters_factory module
Define a function to generate a BeamParameters for TraceWin.
- class BeamParametersFactoryTraceWin(is_3d, is_multipart, beam_kwargs)[source]
Bases:
BeamParametersFactoryA class holding method to generate
BeamParameters.- factory_method(z_abs, gamma_kin, results, element_to_index)[source]
Create the
BeamParametersobject.
- _extract_phase_space_data_for_sigma(phase_space_name, results)[source]
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.
- Return type:
- 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, results)[source]
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 0x73dca8423d00>