:mod:`ocelot.rad.screen` ======================== .. py:module:: ocelot.rad.screen Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: ocelot.rad.screen.Screen Functions ~~~~~~~~~ .. autoapisummary:: ocelot.rad.screen.Py2C ocelot.rad.screen.sum_screens .. data:: __author__ :annotation: = Sergey Tomin Screen class for SR module. The first version was written in 2011 - 2012. S.Tomin .. function:: Py2C(array) .. py:class:: 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 .. method:: update(self) .. method:: 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. :param x0: initial the electron coordinate :param y0: initial the electron coordinate :param z0: initial the electron coordinate :return: .. method:: screen_to_emscreen(self, screen) .. method:: create_empty_emclass(self) .. method:: nullify(self) .. method:: create_like(self, em_screen) .. method:: screenPy2C(self, lperiod, nperiods, status) .. method:: screenC2Py(self, c_screen) .. method:: 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)) :param gamma: :param current: in A :return: .. method:: 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() :return: .. method:: zerosArray(self) .. method:: screen2dict(self) .. method:: dict2screen(self, dictionaty) .. function:: 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.