Polarized neutrons. Fresnel coefficients and wave function

New in version 0.9.3.

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 polarized neutrons.

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.polreftrans.polnreftrans_rm(name, p0, multilayer_obj ml, layidx, b_ext, poleff_i, poleff_f)

New in version 0.9.3.

Method for creating a functor to calculate the Fresnel reflection operator inside a layer with the index Layidx for the polarization state defined by the signs of poleff_i and poleff_f values. 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.

layers with gradients.

Parameters:
p0: variable_obj or functor_obj

Variable or functor, which represents z-component of wave vector

ml: multilayer_obj

Sample description object

‘layidx’: int or int_setting_obj

Index of the layer

b_ext: list or tuple

External magnetic field components in Tesla. The components are in the sample coordinate system.

poleff_i: double or parameter_obj

Polarization efficiency of the incident beam.

poleff_f: double or parameter_obj

Polarization efficiency of the forthcoming beam.

Returns:

cplx_functor_obj instance

escape.scattering.polreftrans.polnreftrans_tm(name, p0, multilayer_obj ml, layidx, b_ext, poleff_i, poleff_f)

New in version 0.9.3.

Method which returns a functor instance to calculate the Fresnel transmission coefficient inside a layer with the index Layidx for the polarization state defined by the signs of poleff_i and poleff_f values. 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.

layers with gradients.

Parameters:
p0: variable_obj or functor_obj

Variable or functor, which represents z-component of wave vector

ml: multilayer_obj

Sample description object

Layidx: int or int_setting_obj

Index of the layer

b_ext: list or tuple

External magnetic field components in Tesla. The components are in the sample coordinate system.

poleff_i: double or parameter_obj

Polarization efficiency of the incident beam.

poleff_f: double or parameter_obj

Polarization efficiency of the forthcoming beam.

Returns:

cplx_functor_obj instance

escape.scattering.polreftrans.polnreftrans_kz(name, p0, multilayer_obj ml, layidx, b_ext, poleff_i, poleff_f)

New in version 0.9.3.

Method which returns a functor to calculate the transverse component of the wave-vector inside a layer with the index Layidx for the polarization state defined by the signs of poleff_i and poleff_f values. 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.

layers with gradients.

Parameters:
p0: variable_obj or functor_obj

Variable or functor, which represents z-component of wave vector

ml: multilayer_obj

Sample description object

Layidx: int or int_setting_obj

Index of the layer

b_ext: list or tuple

External magnetic field components in Tesla. The components are in the sample coordinate system.

poleff_i: double or parameter_obj

Polarization efficiency of the incident beam.

poleff_f: double or parameter_obj

Polarization efficiency of the forthcoming beam.

Returns:

cplx_functor_obj instance

escape.scattering.polreftrans.polnreftrans_sm(name, p0, z, multilayer_obj ml, b_ext, poleff_i, poleff_f)

New in version 0.9.3.

Method which returns a functor to calculate the propagation operator components in the sample ml for given transverse wave-vector component p0 in vacuum and z coordinate inside the sample.

Z-axis is normal to sample surface and directed inside the multilayer with 0 at the air/layer1 interface. The propagation matrix components are calculated using the following equation:

\(\hat{S}(p0, z) = \hat{T}_m\exp(i\hat{p}_m(z-z_m))+\hat{R}_m\exp(-i\hat{p}_m(z-z_m))\),

where \(p_m\) - operator of Z-component of the wave-vector inside layer ‘m’, \(z_m\) - z - coordinate of the bottom interface of layer ‘m’ \(\hat{T}_m\), \(\hat{R}_m\) - Fresnel coefficients operators inside layer ‘m’

The corresponding layer ‘m’ is found using the input value of Z coordinate.

Parameters:
p0: variable_obj or functor_obj

Variable or functor, which represents transverse component of wave vector

z: variable_obj or functor_obj

Variable or functor, which represents Z-coordinate axis perpendicular to the sample normal.

ml: multilayer_obj

Sample description object

b_ext: list or tuple

External magnetic field components in Tesla. The components are in the sample coordinate system.

poleff_i: double or parameter_obj

Polarization efficiency of the incident beam.

poleff_f: double or parameter_obj

Polarization efficiency of the forthcoming beam.

Returns:

cplx_functor_obj instance

escape.scattering.polreftrans.polnreftrans_pd(name, p0, z, multilayer_obj ml, b_ext, poleff_i, poleff_f)

New in version 0.9.3.

Method which returns a functor to calculate the position probability density or simply :math:`left|psi(x, y, z)

ight|^2`, for the sample ml for given

transverse wave-vector component p0 in vacuum and z coordinate inside the sample.

Z-axis is normal to sample surface and directed inside the multilayer with 0 at the air/layer1 interface.

The corresponding layer ‘m’ is found using the input value of Z coordinate.

Parameters:
p0: variable_obj or functor_obj

Variable or functor, which represents transverse component of wave vector

z: variable_obj or functor_obj

Variable or functor, which represents Z-coordinate axis perpendicular to the sample normal.

ml: multilayer_obj

Sample description object

b_ext: list or tuple

External magnetic field components in Tesla. The components are in the sample coordinate system.

poleff_i: double or parameter_obj

Polarization efficiency of the incident beam.

poleff_f: double or parameter_obj

Polarization efficiency of the forthcoming beam.

return:

cplx_functor_obj instance