factory module

Provide an easy way to generate TransferMatrix.

class TransferMatrixFactory(is_3d)[source]

Bases: ABC

Provide a method for easy creation of TransferMatrix.

This class should be subclassed by every BeamCalculator.

Parameters:

is_3d (bool)

__init__(is_3d)[source]

Store if simulation is in 3D or not.

Parameters:

is_3d (bool) – If the simulation is 3D or not.

Return type:

None

_preprocess(single_elt_results)[source]

Preprocess the data given by the BeamCalculator.

Parameters:

single_elt_results (list[dict[str, Any]])

Return type:

ndarray

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

Create the transfer matrix from a simulation.

Return type:

TransferMatrix

Returns:

All cumulated transfer matrices in all the planes.

_abc_impl = <_abc._abc_data object at 0x7318faeef440>