pysrw.magnets.MagnetsContainer#

class pysrw.magnets.MagnetsContainer(magnets, lengthPadFraction=1.0, lengthResolution=5e-05, forceMinZ=None, forceMaxZ=None)[source]#

Bases: object

__init__(magnets, lengthPadFraction=1.0, lengthResolution=5e-05, forceMinZ=None, forceMaxZ=None)[source]#

Container of the magnetic elements. This class groups the magnetic devices and defines the integration parameters for the trajectory simulation.

Parameters:
  • magnets – list of magnetic elements, instances of the classes available in magnets.

  • lengthPadFraction (optional) – extra distance as a fraction of the minimum container extension. Defaults to 1.0.

  • lengthResolution (optional) – discretization of the longitudinal coordinate for the computation of the trajectory, in meters. Defaults to 50e-6.

  • forceMinZ (optional) –

    user-defined position to start the trajectory computation. If None, the start is assumed at the entrance of the container, adding the extra margin specified

    by lengthPadFraction. Defaults to None.

  • forceMaxZ (optional) – same as forceMinZ for the integration end. Defaults to None.

Methods

__init__(magnets[, lengthPadFraction, ...])

Container of the magnetic elements.

getIntegrationParams()

Get the start, end and discretization step of the longitudinal

getIntegrationParams()[source]#
Get the start, end and discretization step of the longitudinal

coordinate used to compute the particle trajectory.

Returns:

parameters for the trajectory computation.

Return type:

list