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:
ABCA base class for creation of
SimulationOutput.- Parameters:
is_multipart (
bool)beam_calculator_id (
str)beam_kwargs (
BeamKwargs)
- __init__(is_multipart, beam_calculator_id, beam_kwargs)[source]
Create the object.
- Parameters:
is_multipart (
bool) – IfSimulationOutputare 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:
accelerator_id (
str)elts (
ListOfElements)
- Return type:
- abstractmethod _get_cav_params(*args, **kwargs)[source]
Load and format a dict containing cavity parameters.
- Return type:
- _abc_impl = <_abc._abc_data object at 0x7318fb6aeb00>