pysrw.lib.srwlib.SRWLOptT#

class pysrw.lib.srwlib.SRWLOptT(_nx=1, _ny=1, _rx=0.001, _ry=0.001, _arTr=None, _extTr=0, _Fx=1e+23, _Fy=1e+23, _x=0, _y=0, _ne=1, _eStart=0, _eFin=0, _alloc_base=[0])[source]#

Bases: SRWLOpt

Optical Element: Transmission (generic)

__init__(_nx=1, _ny=1, _rx=0.001, _ry=0.001, _arTr=None, _extTr=0, _Fx=1e+23, _Fy=1e+23, _x=0, _y=0, _ne=1, _eStart=0, _eFin=0, _alloc_base=[0])[source]#
Parameters:
  • _nx – number of transmission data points in the horizontal direction

  • _ny – number of transmission data points in the vertical direction

  • _rx – range of the horizontal coordinate [m] for which the transmission is defined

  • _ry – range of the vertical coordinate [m] for which the transmission is defined

  • _arTr – complex C-aligned data array (of 2*ne*nx*ny length) storing amplitude transmission and optical path difference as function of transverse coordinates

  • _extTr – transmission outside the grid/mesh is zero (0), or it is same as on boundary (1)

  • _Fx – estimated focal length in the horizontal plane [m]

  • _Fy – estimated focal length in the vertical plane [m]

  • _x – horizontal transverse coordinate of center [m]

  • _y – vertical transverse coordinate of center [m]

  • _ne – number of transmission data points vs photon energy

  • _eStart – initial value of photon energy

  • _eFin – final value of photon energy

Methods

__init__([_nx, _ny, _rx, _ry, _arTr, ...])

param _nx:

number of transmission data points in the horizontal direction

allocate(_ne, _nx, _ny[, _alloc_base])

get_data(_typ[, _dep, _e, _x, _y])

Returns Transmission Data Characteristic :param _typ: type of transmission characteristic to extract: 1- amplitude transmission, 2- intensity transmission, 3- optical path difference :param _dep: type of dependence to extract: 0- vs photon energy, 1- vs horizontal position, 2- vs vertical position, 3- vs hor.

get_orient([_e])

randomize()

Randomizes parameters of optical element according to self.RandParam to simulate e.g. impact of vibrations on coherence (in P-C calculations).

set_rand_par(_rand_par)

Sets list of params to be eventually randomized in some types of calculations :param _rand_par: list of params to be randomized; each element of this list should be: ['param_name', val_avg, val_range, meth]

get_data(_typ, _dep=3, _e=0, _x=0, _y=0)[source]#

Returns Transmission Data Characteristic :param _typ: type of transmission characteristic to extract: 1- amplitude transmission, 2- intensity transmission, 3- optical path difference :param _dep: type of dependence to extract: 0- vs photon energy, 1- vs horizontal position, 2- vs vertical position, 3- vs hor. & vert. positions :param _e: photon energy [eV] (to keep fixed) :param _x: horizontal position [m] (to keep fixed) :param _y: vertical position [m] (to keep fixed)

randomize()[source]#

Randomizes parameters of optical element according to self.RandParam to simulate e.g. impact of vibrations on coherence (in P-C calculations)