beam_parameters_factory module

Define a function to generate a BeamParameters for TraceWin.

class BeamParametersFactoryTraceWin(is_3d, is_multipart, beam_kwargs)[source]

Bases: BeamParametersFactory

A class holding method to generate BeamParameters.

Parameters:
factory_method(z_abs, gamma_kin, results, element_to_index)[source]

Create the BeamParameters object.

Parameters:
Return type:

BeamParameters

_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.out or partran1.out headers and which values are corresponding data.

Return type:

tuple[ndarray, ndarray, ndarray]

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.out or partran1.out headers and which values are corresponding data.

Returns:

eps – 99% emittance in the desired phase space.

Return type:

numpy.ndarray

_abc_impl = <_abc._abc_data object at 0x73dca8423d00>