pysrw.lib.srwlib.SRWLParticle

pysrw.lib.srwlib.SRWLParticle#

class pysrw.lib.srwlib.SRWLParticle(_x=0, _y=0, _z=0, _xp=0, _yp=0, _gamma=1, _relE0=1, _nq=-1)[source]#

Bases: object

Charged Particle

__init__(_x=0, _y=0, _z=0, _xp=0, _yp=0, _gamma=1, _relE0=1, _nq=-1)[source]#
Parameters:
  • _x – instant coordinates [m]

  • _y – instant coordinates [m]

  • _z – instant coordinates [m]

  • _xp – instant transverse velocity component btx = vx/c (angles for relativistic particle)

  • _yp – instant transverse velocity component bty = vy/c (angles for relativistic particle)

  • _gamma – relative energy

  • _relE0 – rest mass (energy) in units of electron rest mass, e.g. 1 for electron, 1836.1526988 (=938.272013/0.510998902) for proton

  • _nq – charge of the particle related to absolute value of electron charge, -1 for electron, 1 for positron and for proton

Methods

__init__([_x, _y, _z, _xp, _yp, _gamma, ...])

param _x:

instant coordinates [m]

drift(_dist)

Propagates particle beam statistical moments over a distance in free space :param _dist: distance the beam has to be propagated over [m]

get_E([_unit])

drift(_dist)[source]#

Propagates particle beam statistical moments over a distance in free space :param _dist: distance the beam has to be propagated over [m]