pysrw.wavefronts.Stokes#
- class pysrw.wavefronts.Stokes(observer, wavelength)[source]#
Bases:
SRWLStokes
- __init__(observer, wavelength)[source]#
Class to represent the Stokes parameters of the radiation field.
- Parameters:
observer – an observation mesh instance of
Observer
.wavelength – the observation wavelength in nanometer.
Methods
__init__
(observer, wavelength)Class to represent the Stokes parameters of the radiation field.
add_stokes
(_st[, _n_comp, _mult, _meth])Add Another Stokes structure :param _st: Stokes structure to be added :param _n_comp: number of components to treat :param _mult: multiplier :param _meth: method of adding the Stokes structure _st: 0- simple addition assuming _wfr to have same mesh as this wavefront 1- add using bilinear interpolation (taking into account meshes of the two wavefronts) 2- add using bi-quadratic interpolation (taking into account meshes of the two wavefronts) 3- add using bi-cubic interpolation (taking into account meshes of the two wavefronts)
allocate
(_ne, _nx, _ny[, _typeStokes, ...])avg_update_interp
(_more_stokes, _iter, _ord)Update this Stokes data structure with new data, contained in the _more_stokes structure, calculated on a different 2D mesh, so that it would represent estimation of average of (_iter + 1) structures :param _more_stokes: Stokes data structure to "add" to the estimation of average :param _iter: number of Stokes structures already "added" previously :param _ord: order of 2D interpolation to use (1- bilinear, ..., 3- bi-cubic) :param _n_stokes_comp: number of Stokes components to treat (1 to 4) :param _mult: optional multiplier of the _more_stokes
avg_update_interp_mutual
(_more_stokes, _iter)Update this Stokes data structure with new data, contained in the _more_stokes structure, calculated on a different 2D mesh, so that it would represent estimation of average of (_iter + 1) structures :param _more_stokes: Stokes data structure to "add" to the estimation of average :param _iter: number of Stokes structures already "added" previously :param _n_stokes_comp: number of Stokes components to treat (1 to 4) :param _mult: optional multiplier of the _more_stokes
avg_update_same_mesh
(_more_stokes, _iter[, ...])Update this Stokes data structure with new data, contained in the _more_stokes structure, calculated on the same mesh, so that this structure would represent estimation of average of (_iter + 1) structures :param _more_stokes: Stokes data structure to "add" to the estimation of average :param _iter: number of Stokes structures already "added" previously :param _n_stokes_comp: number of Stokes components to treat (1 to 4) :param _mult: optional multiplier of the _more_stokes
Compute the power density associated with the radiation Stokes parameters.
to_deg_coh
([_rel_zer_tol, _rot])Calculates / "extracts" Degree of Coherence from the Mutual Intensity (first Stokes component, s0) :param _rel_zer_tol: relative zero tolerance to use at normalizing (dividing) by the intensity :param _rot: rotate or not the degree of coherence data :return: 1D array with (C-aligned) resulting degree of coherence data
to_int
([_pol])Calculates / "extracts" intensity at a given polarization from the Stokes components :param _pol: polarization component to extract: 0- Linear Horizontal; 1- Linear Vertical; 2- Linear 45 degrees; 3- Linear 135 degrees; 4- Circular Right; 5- Circular Left; 6- Total :return: 1D array with (C-aligned) resulting intensity data