ocelot.rad.screen
¶
Module Contents¶
Classes¶
Class to store radiation field and to provide information about screen parameters where radiation will be observed. |
Functions¶
|
|
|
the function accumulates the radiations from different emitters which placed in consecutive order (u_down, d, u_up, …). |
Screen class for SR module. The first version was written in 2011 - 2012. S.Tomin
-
ocelot.rad.screen.
Py2C
(array)¶
-
class
ocelot.rad.screen.
Screen
¶ Class to store radiation field and to provide information about screen parameters where radiation will be observed. Format for electric fields in arrays (arReEx, arImEx, …) is following: ReEx[ny*nx*je + nx*jy + jx]
self.z: 100.0 [m], distance from the beginning of the lattice to the screen self.size_x: 1 [m], half of screen size in horizontal plane self.size_y: 1 [m], half of screen size in vertical self.nx: 1, number of points in horizontal plane self.ny: 1, number of points in vertical plane self.start_energy: 100.0 [eV], starting photon energy self.end_energy: 10000.0 [eV], ending photon energy self.num_energy: 1000, number of energy points self.arReEx = [], Real part of horizontal component of the electric field self.arImEx = [], Imaginary part of horizontal component of the electric field self.arReEy = [], Real part of the vertical component of the electric field self.arImEy = [], Imaginary part of the vertical component of the electric field self.arPhase = [], phase between Re and Im components
-
update
(self)¶
-
rebuild_efields
(self, x0=0, y0=0, z0=0)¶ the method recalculates the field phase and electrical fields to obtain the correct values that can be used to propagate the wave front.
- Parameters
x0 – initial the electron coordinate
y0 – initial the electron coordinate
z0 – initial the electron coordinate
- Returns
-
screen_to_emscreen
(self, screen)¶
-
create_empty_emclass
(self)¶
-
nullify
(self)¶
-
create_like
(self, em_screen)¶
-
screenPy2C
(self, lperiod, nperiods, status)¶
-
screenC2Py
(self, c_screen)¶
-
distPhoton
(self, gamma, current)¶ On the area ds during 1 sec falls dN photons in spectral width (dlambda/lambda) dN = ds/Distance**2 * (dlambda/lambda) * (I/qe) * 3*alpha*gamma**2/(4*pi**2) * |Eul(lambda, Xscreen)|**2 Eul(lambda, Xscreen) is unitless electric field: Eul(lambda, Xscreen) = - (c/qe) * D/(sqrt(3)*gamma**2) * (E(lambda, Xscreen))
- Parameters
gamma –
current – in A
- Returns
-
coherent_photon_dist
(self)¶ On the area ds during 1 sec falls dN photons in spectral width (dlambda/lambda) dN = ds/Distance**2 * (dlambda/lambda) * (I/qe) * 3*alpha*gamma**2/(4*pi**2) * |Eul(lambda, Xscreen)|**2 Eul(lambda, Xscreen) is unitless electric field: Eul(lambda, Xscreen) = - (c/qe) * D/(sqrt(3)*gamma**2) * (E(lambda, Xscreen))
For coherent radiation calculation: I = qe dN = ds/Distance**2 * (dlambda/lambda) * 3*alpha/(4*pi**2) * |Eul(lambda, Xscreen) * gamma * n_e|**2 |Eul(lambda, Xscreen) * gamma * n_e| is calculated in function coherent_radiation()
- Returns
-
zerosArray
(self)¶
-
screen2dict
(self)¶
-
dict2screen
(self, dictionaty)¶
-
-
ocelot.rad.screen.
sum_screens
(screen_down, screen_up)¶ the function accumulates the radiations from different emitters which placed in consecutive order (u_down, d, u_up, …). This means that before summation of screens we must rotate the electric field vectors of a screen_up on angle screen_down.arPhase anticlockwise, because the radiation calculation starts from zero phase from each emitter.