Specular reflectivity#

This module contains methods to create functor_obj instances for calculation of X-ray or neutron specular reflectivity.

escape.scattering.specrefl.offspecrefl(qx: FunctorLike, ki_z: FunctorLike, kf_z: FunctorLike, ml: multilayer_obj, source: source_obj = None, formalism: str = 'full', name: str = 'Off-specular reflectivity', notes: str = '') → functor_obj#

Returns functor object for calculation of DWBA off-specular reflectivity.

Parameters:
qx: FunctorLike

Variable or functor representing the in-plane scattering vector.

ki_z: FunctorLike

Variable or functor representing incident longitudinal wavevector.

kf_z: FunctorLike

Variable or functor representing exit longitudinal wavevector.

ml: multilayer_obj

Sample description object.

source: source_obj

Source description object.

formalism: str, optional

“full” - full four-channel DWBA covariance expression. “small_reflection” - keep only the dominant TT/Q00 term.

name: str, optional

Functor name.

notes: str, optional

User notes for the object.

Returns:

functor_obj instance

escape.scattering.specrefl.offspecrefl2d(qx: FunctorLike, qy: FunctorLike, ki_z: FunctorLike, kf_z: FunctorLike, ml: multilayer_obj, source: source_obj = None, formalism: str = 'full', name: str = '2D off-specular reflectivity', notes: str = '') → functor_obj#

Returns functor object for 2D DWBA diffuse off-specular reflectivity.

Parameters:
qx: FunctorLike

Variable or functor representing the first in-plane scattering vector.

qy: FunctorLike

Variable or functor representing the second in-plane scattering vector.

ki_z: FunctorLike

Variable or functor representing incident longitudinal wavevector.

kf_z: FunctorLike

Variable or functor representing exit longitudinal wavevector.

ml: multilayer_obj

Sample description object.

source: source_obj

Source description object.

formalism: str, optional

“full” - full four-channel DWBA covariance expression. “small_reflection” - keep only the dominant TT/Q00 term.

name: str, optional

Functor name.

notes: str, optional

User notes for the object.

Returns:

functor_obj instance

escape.scattering.specrefl.pnrmaranville(qz: FunctorLike, ml: multilayer_obj, b_ext: list, poleff_i: parameter_obj, poleff_f: parameter_obj, source: source_obj = None, zeeman_mode: bool = False, name: str = 'PNR Maranville', notes: str = '') → functor_obj#

Returns functor object for polarized neutron specular reflectivity using the Maranville / GEPORE 4×4 transfer-matrix formalism.

This handler implements the GEPORE Cr4xa algorithm (Maranville et al. 2016, Phys. Rev. Lett.) using a forward 4×4 block transfer matrix that couples the two spin channels via spinor mixing coefficients U1/U3.

Key differences from pnrspec() (Toperverg formalism):

  • Recursion direction: forward (fronting → substrate) vs backward.

  • Roughness model: Nevot-Croce single factor vs Stepanov two-factor.

  • Out-of-plane magnetisation (B_z ≠ 0) is not supported by GEPORE; a runtime error is raised if significant B_z is present.

Added in version 0.9.4.

Parameters:
qz: FunctorLike

Variable or functor representing the z-component of the scattering vector.

ml: multilayer_obj

Sample description object.

b_ext: list or tuple

External magnetic field components in Tesla (sample coordinate system). Used as spin quantization axis.

poleff_i: ParameterLike

Efficiency of the incident beam polarization. Sign defines polarization direction (up = +1, down = −1).

poleff_f: ParameterLike

Efficiency of the analyzed beam polarization.

source: source_obj, optional

Source description object.

zeeman_mode: bool, optional

Controls how the external field enters the optical potential. False: uses b_ext only as the spin quantization axis. True: includes the external-field magnetic SLD in the layer optical potentials.

name: str, optional

Functor name.

notes: str, optional

User notes for the object.

Returns:

functor_obj instance

escape.scattering.specrefl.pnrspec(qz: FunctorLike, ml: multilayer_obj, b_ext: list, poleff_i: parameter_obj, poleff_f: parameter_obj, source: source_obj = None, zeeman_mode: bool = False, name: str = 'Pol. neutron specular reflectivity', notes: str = '') → functor_obj#

Returns functor object for calculation of polarized neutron specular reflectivity.

Changed in version 0.9.1.

Added support for qz functor_obj type.

Changed in version 0.9.3.

Added external magnetic field as the input parameter

Parameters:
qz: FunctorLike

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

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: ParameterLike

Efficiency of the incident beam polarization. Sign of this parameter defines polarization direction, i.e. up or down.

poleff_f: ParameterLike

Efficiency of the forthcoming beam polarization. Sign of this parameter defines polarization direction, i.e. up or down.

source: source_obj

Source description object

zeeman_mode: bool, optional

Controls how the external field is used in the optical potential. False: uses b_ext only as the spin quantization axis. True: includes the external-field magnetic SLD in the layer optical potentials.

name: str, optional

Functor name.

notes: str, optional

User notes for the object.

Returns:

functor_obj instance

escape.scattering.specrefl.specrefl(qz: FunctorLike, ml: multilayer_obj, formalism: str = 'parratt', source: source_obj = None, name: str = 'Specular reflectivity', notes: str = '') → functor_obj#

Returns functor object for calculation of specular reflectivity.

Changed in version 0.9.1.

Added support for qz functor_obj type.

Parameters:
qz: FunctorLike

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

ml: multilayer_obj

Sample description object

formalism: string

‘parratt’ - recursive parratt formalism (dynamic scattering) ‘kinematic’ - kinematic formalism (kinematic scattering, i.e. Born approximation) ‘matrix’ - matrix formalism (dynamic scattering) ‘matrix_lr’ - augmented matrix with 2nd-order roughness correction

source: source_obj

Source description object

name: str, optional

Functor name.

notes: str, optional

User notes for the object.

Returns:

functor_obj instance