pysrw.emitters.ParticleBeam

pysrw.emitters.ParticleBeam#

class pysrw.emitters.ParticleBeam(energy, xPos, yPos, zPos, xAngle=0, yAngle=0, xSigma=0, ySigma=0, xDiv=0, yDiv=0, dEoverE=0, current=1)[source]#

Bases: SRWLPartBeam

__init__(energy, xPos, yPos, zPos, xAngle=0, yAngle=0, xSigma=0, ySigma=0, xDiv=0, yDiv=0, dEoverE=0, current=1)[source]#

Ultrarelativistic beam. All quantities are referred to the start of the computation, i.e. for c*t=0.

Parameters:
  • energy – particle energy in Gev.

  • xPos – particle x position.

  • yPos – particle y position.

  • zPos – particle z position.

  • xAngle (optional) – horizontal tilt angle. Defaults to 0.

  • yAngle (optional) – vertical tilt angle. Defaults to 0.

  • xSigma (optional) – horizontal beam size. Defaults to 0.

  • ySigma (optional) – vertical beam size. Defaults to 0.

  • xDiv (optional) – horizontal beam divergence. Defaults to 0.

  • yDiv (optional) – vertical beam divergence. Defaults to 0.

  • dEoverE (optional) – energy spread. Defaults to 0.

Methods

__init__(energy, xPos, yPos, zPos[, xAngle, ...])

Ultrarelativistic beam.

drift(_dist)

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

from_RMS([_Iavg, _e, _sig_e, _sig_x, ...])

Sets up particle (electron) beam internal data from Twiss parameters :param _Iavg: average current [A] :param _e: energy [GeV] :param _sig_e: RMS energy spread :param _sig_x: horizontal RMS size [m] :param _sig_x_pr: horizontal RMS divergence [rad] :param _m_xx_pr: <(x-<x>)(x'-<x'>)> [m] :param _sig_y: vertical RMS size [m] :param _sig_y_pr: vertical RMS divergence [rad] :param _m_yy_pr: <(y-<y>)(y'-<y'>)> [m]

from_Twiss([_Iavg, _e, _sig_e, _emit_x, ...])

Sets up particle (electron) beam internal data from Twiss parameters :param _Iavg: average current [A] :param _e: energy [GeV] :param _sig_e: RMS energy spread :param _emit_x: horizontal emittance [m] :param _beta_x: horizontal beta-function [m] :param _alpha_x: horizontal alpha-function [rad] :param _eta_x: horizontal dispersion function [m] :param _eta_x_pr: horizontal dispersion function derivative [rad] :param _emit_y: vertical emittance [m] :param _beta_y: vertical beta-function [m] :param _alpha_y: vertical alpha-function [rad] :param _eta_y: vertical dispersion function [m] :param _eta_y_pr: vertical dispersion function derivative [rad]