pysrw.computations.computeTrajectory#
- pysrw.computations.computeTrajectory(particle, magnetsContainer, sStart=None, sEnd=None, res=None)[source]#
Compute the trajectory inside a magnetic structure.
- Parameters:
particle – an instance of
Particle
orParticleBeam
.magnetsContainer – the magnet container instance of
MagnetsContainer
sStart (optional) – start of the trajectory computation in \(c \cdot t\). If None, the zStart of the magnetsContainer is used. Defaults to None.
sEnd (optional) – end of the trajectory computation in \(c \cdot t\). If None, the zEnd of the magnetsContainer is used. Defaults to None.
res (optional) – resolution of the trajectory computation in \(c \cdot t\). If None, the nPts of the magnetsContainer is used. Defaults to None.
- Returns:
- trajectory result as dictionary with the positions, deflections
and transverse field experienced by the particle during the motion.
- Return type:
dict