ocelot.cpbd.physics_proc
¶
Module Contents¶
Classes¶
Parent class for all Physics processes |
|
Parent class for all Physics processes |
|
Parent class for all Physics processes |
|
Physics Process for the beam smoothing. Can be applied when number of particles is not enough. |
|
Parent class for all Physics processes |
|
Parent class for all Physics processes |
|
Method to cut beam in longitudinal (by default), horizontal or/and vertical direction |
|
Method to cut beam in horizontal or/and vertical direction |
|
Beam matching |
|
Effects of the spontaneous radiation: |
|
Parent class for all Physics processes |
|
simple physics process to simulate longitudinal dynamics in chicane |
-
ocelot.cpbd.physics_proc.
_logger
¶
-
class
ocelot.cpbd.physics_proc.
PhysProc
(step=1)¶ Parent class for all Physics processes
- Method prepare(self, lat)
the method is called at the moment of Physics Process addition to Navigator class.
- Method apply(self, p_array, dz)
the method is called on every step.
- Attribute step
number of steps in [Navigator.unit_step] self.step*Navigator.unit_step = [m]
- Attribute indx0
number of start element in lattice.sequence - assigned in navigator.add_physics_proc()
- Attribute indx1
number of stop element in lattice.sequence - assigned in navigator.add_physics_proc()
- Attribute s_start
position of start element in lattice - assigned in navigator.add_physics_proc()
- Attribute s_stop
position of stop element in lattice.sequence - assigned in navigator.add_physics_proc()
- Attribute z0
current position of navigator - assigned in track.track() before p.apply()
-
prepare
(self, lat)¶ method is called at the moment of Physics Process addition to Navigator class.
- Parameters
lat –
- Returns
-
apply
(self, p_array, dz)¶ the method is called on every step.
- Parameters
p_array –
dz –
- Returns
-
finalize
(self, *args, **kwargs)¶ the method is called at the end of tracking
- Returns
-
class
ocelot.cpbd.physics_proc.
EmptyProc
(step=1)¶ Bases:
ocelot.cpbd.physics_proc.PhysProc
Parent class for all Physics processes
- Method prepare(self, lat)
the method is called at the moment of Physics Process addition to Navigator class.
- Method apply(self, p_array, dz)
the method is called on every step.
- Attribute step
number of steps in [Navigator.unit_step] self.step*Navigator.unit_step = [m]
- Attribute indx0
number of start element in lattice.sequence - assigned in navigator.add_physics_proc()
- Attribute indx1
number of stop element in lattice.sequence - assigned in navigator.add_physics_proc()
- Attribute s_start
position of start element in lattice - assigned in navigator.add_physics_proc()
- Attribute s_stop
position of stop element in lattice.sequence - assigned in navigator.add_physics_proc()
- Attribute z0
current position of navigator - assigned in track.track() before p.apply()
-
class
ocelot.cpbd.physics_proc.
SaveBeam
(filename)¶ Bases:
ocelot.cpbd.physics_proc.PhysProc
Parent class for all Physics processes
- Method prepare(self, lat)
the method is called at the moment of Physics Process addition to Navigator class.
- Method apply(self, p_array, dz)
the method is called on every step.
- Attribute step
number of steps in [Navigator.unit_step] self.step*Navigator.unit_step = [m]
- Attribute indx0
number of start element in lattice.sequence - assigned in navigator.add_physics_proc()
- Attribute indx1
number of stop element in lattice.sequence - assigned in navigator.add_physics_proc()
- Attribute s_start
position of start element in lattice - assigned in navigator.add_physics_proc()
- Attribute s_stop
position of stop element in lattice.sequence - assigned in navigator.add_physics_proc()
- Attribute z0
current position of navigator - assigned in track.track() before p.apply()
-
apply
(self, p_array, dz)¶ the method is called on every step.
- Parameters
p_array –
dz –
- Returns
-
class
ocelot.cpbd.physics_proc.
SmoothBeam
¶ Bases:
ocelot.cpbd.physics_proc.PhysProc
Physics Process for the beam smoothing. Can be applied when number of particles is not enough.
- Attribute mslice
number of particles in the slice
# lat is the MagneticLattice navi = Navigator(lat)
smooth = SmoothBeam() smooth.mslice = 10000
navi.add_physics_process(smooth, start=elem, stop=elem) # elem is the lattice element where you want to apply smoothing
-
apply
(self, p_array, dz)¶ the method is called on every step.
- Parameters
p_array –
dz –
- Returns
-
class
ocelot.cpbd.physics_proc.
LaserModulator
(step=1)¶ Bases:
ocelot.cpbd.physics_proc.PhysProc
Parent class for all Physics processes
- Method prepare(self, lat)
the method is called at the moment of Physics Process addition to Navigator class.
- Method apply(self, p_array, dz)
the method is called on every step.
- Attribute step
number of steps in [Navigator.unit_step] self.step*Navigator.unit_step = [m]
- Attribute indx0
number of start element in lattice.sequence - assigned in navigator.add_physics_proc()
- Attribute indx1
number of stop element in lattice.sequence - assigned in navigator.add_physics_proc()
- Attribute s_start
position of start element in lattice - assigned in navigator.add_physics_proc()
- Attribute s_stop
position of stop element in lattice.sequence - assigned in navigator.add_physics_proc()
- Attribute z0
current position of navigator - assigned in track.track() before p.apply()
-
lambda_ph
(self, energy)¶ Wavelength of the laser pulse
- Parameters
energy – in [GeV] - beam energy
- Returns
wavelength in [m]
-
r56
(self, energy)¶ Method calculate R56 of the undulator
- Parameters
energy – in [GeV] - beam energy
- Returns
R56 in [m]
-
apply
(self, p_array, dz)¶ the method is called on every step.
- Parameters
p_array –
dz –
- Returns
-
class
ocelot.cpbd.physics_proc.
LaserHeater
(step=1)¶ Bases:
ocelot.cpbd.physics_proc.LaserModulator
Parent class for all Physics processes
- Method prepare(self, lat)
the method is called at the moment of Physics Process addition to Navigator class.
- Method apply(self, p_array, dz)
the method is called on every step.
- Attribute step
number of steps in [Navigator.unit_step] self.step*Navigator.unit_step = [m]
- Attribute indx0
number of start element in lattice.sequence - assigned in navigator.add_physics_proc()
- Attribute indx1
number of stop element in lattice.sequence - assigned in navigator.add_physics_proc()
- Attribute s_start
position of start element in lattice - assigned in navigator.add_physics_proc()
- Attribute s_stop
position of stop element in lattice.sequence - assigned in navigator.add_physics_proc()
- Attribute z0
current position of navigator - assigned in track.track() before p.apply()
-
class
ocelot.cpbd.physics_proc.
PhaseSpaceAperture
(step=1)¶ Bases:
ocelot.cpbd.physics_proc.PhysProc
Method to cut beam in longitudinal (by default), horizontal or/and vertical direction
- Parameters
longitudinal – True, cutting in longitudinal direction
vertical – False, cutting in vertical direction
horizontal – False, cutting in horizontal direction
taumin – -5 longitudinal plane in [rms] from center of mass
taumax – 5 longitudinal plane in [rms] from center of mass
xmin – -5 horizontal plane in [rms] from center of mass
xmax – 5 horizontal plane in [rms] from center of mass
ymin – -5 vertical plane in [rms] from center of mass
ymax – 5 vertical plane in [rms] from center of mass
-
apply
(self, p_array, dz)¶ the method is called on every step.
- Parameters
p_array –
dz –
- Returns
-
class
ocelot.cpbd.physics_proc.
RectAperture
(xmin=- np.inf, xmax=np.inf, ymin=- np.inf, ymax=np.inf, step=1)¶ Bases:
ocelot.cpbd.physics_proc.PhysProc
Method to cut beam in horizontal or/and vertical direction
- Parameters
xmin – -np.inf horizontal plane in [m]
xmax – np.inf horizontal plane in [m]
ymin – -np.inf vertical plane in [m]
ymax – np.inf vertical plane in [m]
-
apply
(self, p_array, dz)¶ the method is called on every step.
- Parameters
p_array –
dz –
- Returns
-
class
ocelot.cpbd.physics_proc.
BeamTransform
(tws=None, x_opt=None, y_opt=None)¶ Bases:
ocelot.cpbd.physics_proc.PhysProc
Beam matching
-
property
twiss
(self)¶
-
apply
(self, p_array, dz)¶ the method is called on every step.
- Parameters
p_array –
dz –
- Returns
-
property
-
class
ocelot.cpbd.physics_proc.
SpontanRadEffects
(K=0.0, lperiod=0.0, type='planar')¶ Bases:
ocelot.cpbd.physics_proc.PhysProc
Effects of the spontaneous radiation: energy loss and quantum diffusion
-
apply
(self, p_array, dz)¶ the method is called on every step.
- Parameters
p_array –
dz –
- Returns
-
energy_loss_und
(self, energy, dz)¶
-
sigma_gamma_quant
(self, energy, dz)¶ rate of energy diffusion
- Parameters
energy – electron beam energy
Kx – undulator parameter
lperiod – undulator period
dz – length of the
- Returns
sigma_gamma/gamma
-
-
class
ocelot.cpbd.physics_proc.
BeamAnalysis
(filename)¶ Bases:
ocelot.cpbd.physics_proc.PhysProc
Parent class for all Physics processes
- Method prepare(self, lat)
the method is called at the moment of Physics Process addition to Navigator class.
- Method apply(self, p_array, dz)
the method is called on every step.
- Attribute step
number of steps in [Navigator.unit_step] self.step*Navigator.unit_step = [m]
- Attribute indx0
number of start element in lattice.sequence - assigned in navigator.add_physics_proc()
- Attribute indx1
number of stop element in lattice.sequence - assigned in navigator.add_physics_proc()
- Attribute s_start
position of start element in lattice - assigned in navigator.add_physics_proc()
- Attribute s_stop
position of stop element in lattice.sequence - assigned in navigator.add_physics_proc()
- Attribute z0
current position of navigator - assigned in track.track() before p.apply()
-
apply
(self, p_array, dz)¶ the method is called on every step.
- Parameters
p_array –
dz –
- Returns
-
finalize
(self)¶ the method is called at the end of tracking
- Returns
-
class
ocelot.cpbd.physics_proc.
Chicane
(r56, t566=0.0)¶ Bases:
ocelot.cpbd.physics_proc.PhysProc
simple physics process to simulate longitudinal dynamics in chicane
-
apply
(self, p_array, dz)¶ the method is called on every step.
- Parameters
p_array –
dz –
- Returns
-