Fresnel coefficients and wave function¶
New in version 0.9.1.
This module is a collection of functors to calculate Fresnel coefficients and scattering wave function inside multilayer samples. The calculation is made by means of matrix formalism and is valid for nonpolarized neutrons and Xrays.
Functors provided by this module can be used for modelling of grazing incidence small angle scattering, standing waves applications, like searching of resonance conditions or emission of Gammas, etc.

escape.scattering.reftrans.
reftrans_rm
(name, p0, multilayer_obj ml, layidx)¶ Function for creating a functor to calculate the Fresnel reflection coefficient inside a layer with the index Layidx. The layer index starts with 0 for the air/sample interface and ends at N+1, where N is the number of layers in the ml sample.
New in version 0.9.1.
layers with gradients.
 Parameters
 p0: variable_obj or functor_obj
Variable or functor, which represents zcomponent of wave vector
 ml: multilayer_obj
Sample description object
 ‘layidx’: int or int_setting_obj
Index of the layer
 Returns
cplx_functor_obj instance

escape.scattering.reftrans.
reftrans_tm
(name, p0, multilayer_obj ml, layidx)¶ Function for creating a functor to calculate the Fresnel transmission coefficient inside a layer with the index Layidx. The layer index starts with 0 for the air/sample interface and ends at N+1, where N is the number of layers in the ml sample.
New in version 0.9.1.
layers with gradients.
 Parameters
 p0: variable_obj or functor_obj
Variable or functor, which represents zcomponent of wave vector
 ml: multilayer_obj
Sample description object
 Layidx: int or int_setting_obj
Index of the layer
 Returns
cplx_functor_obj instance

escape.scattering.reftrans.
reftrans_kz
(name, p0, multilayer_obj ml, layidx)¶ Function for creating a functor to calculate the transverse component of the wavevector inside a layer with the index Layidx. The layer index starts with 0 for the air/sample interface and ends at N+1, where N is the number of layers in the ml sample.
New in version 0.9.1.
layers with gradients.
 Parameters
 p0: variable_obj or functor_obj
Variable or functor, which represents zcomponent of wave vector
 ml: multilayer_obj
Sample description object
 Layidx: int or int_setting_obj
Index of the layer
 Returns
cplx_functor_obj instance

escape.scattering.reftrans.
reftrans_wf
(name, p0, z, multilayer_obj ml)¶ Function for creating a functor to calculate the wavefunction in the sample ml for given transverse wavevector component p0 in vacuum and z coordinate inside the sample.
Zaxis is normal to sample surface and directed inside the multilayer with 0 at the ait/layer1 interface. The wave function is calculated using the following equation:
\(\psi(p0, z) = T_m\exp(ip_m(zz_m))+R_m\exp(ip_m(zz_m))\),
where \(p_m\)  Zcomponent of wavevector inside layer ‘m’, \(z_m\)  z  coordinate of the bottom interface of layer ‘m’ \(T_m\), \(R_m\)  Fresnel coefficients inside layer ‘m’
The corresponding layer ‘m’ is found using value of Z coordinate.
New in version 0.9.1.
 Parameters
 p0: variable_obj or functor_obj
Variable or functor, which represents zcomponent of wave vector
 ml: multilayer_obj
Sample description object
 Layidx: int or int_setting_obj
Index of the layer
 Returns
cplx_functor_obj instance