factory module

Define a class to easily generate the SimulationOutput.

This class should be subclassed by every BeamCalculator to match its own specific outputs.

class SimulationOutputFactory(is_multipart, beam_calculator_id, beam_kwargs)[source]

Bases: ABC

A base class for creation of SimulationOutput.

Parameters:
_is_3d: bool
__init__(is_multipart, beam_calculator_id, beam_kwargs)[source]

Create the object.

Parameters:
  • is_multipart (bool) – If SimulationOutput are obtained with a multiparticle solver.

  • beam_calculator_id (str) – ID of solver that created this object. Also used as the name of the subdirectory where results should be saved. Typically, "0_Envelope1D" or "1_TraceWin".

  • beam_kwargs (BeamKwargs) – Beam properties.

Return type:

None

abstract property _transfer_matrix_factory_class: ABCMeta

Declare the class of the transfer matrix factory.

abstract property _beam_parameters_factory_class: ABCMeta

Declare the class of the beam parameters factory.

abstractmethod create(accelerator_id, elts, *args, **kwargs)[source]

Create the SimulationOutput.

Parameters:
Return type:

SimulationOutput

abstractmethod _get_cav_params(*args, **kwargs)[source]

Load and format a dict containing cavity parameters.

Return type:

CavParams

_abc_impl = <_abc._abc_data object at 0x7318fb6aeb00>