core.transfer_matrix.factory module

Provide an easy way to generate TransferMatrix.

class TransferMatrixFactory(is_3d: bool)

Bases: ABC

Provide a method for easy creation of TransferMatrix.

This class should be subclassed by every BeamCalculator.

__init__(is_3d: bool) None

Store if simulation is in 3D or not.

Parameters:

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

_abc_impl = <_abc._abc_data object>
_preprocess(single_elt_results: list[dict[str, Any]]) ndarray

Preprocess the data given by the BeamCalculator.

abstract run(*args, **kwargs) TransferMatrix

Create the transfer matrix from a simulation.

Returns:

Holds all cumulated transfer matrices in all the planes.

Return type:

TransferMatrix