Algorithms#

Warning

This tutorial is currently under construction and may contain errors or incomplete information. Please check back later for updates.

The following algorithms are available in XEFI:

  • DEV : An implementation of the original Parratt recursive algorithm, which is the default algorithm used in XEFI. This algorithm is currently the only one that is performing correctly.

  • TOLAND : A modified version of the Parratt algorithm that uses a different approach to calculate the electric field intensity. This algorithm is currently under development and may not be performing correctly.

  • ABELES : A matrix method that uses the Abeles matrix formalism to calculate the electric field intensity. This algorithm is currently under development and may not be performing correctly.

Each method can be selected by passing the method argument to the calculation method. For example,

result = XEFI.XEF_Basic(
    energies=beam_energies,
    angles=angle,
    z=z,
    refractive_indices=refractive_indices,
    method=XEFI.XEF_method.TOLAND,
)

DEV#

This algorithm is based on the formulation wrriten in the paper by Dev et al., Resonance enhancement of x rays in layered materials: Application to surface enrichment in polymer blends.

The field equations are

\[\begin{split}E^r_j &= a_j^2 X_j E_j^t,\\ E^t_{j+1} &= \dfrac{a_j E^t_j t_j T_j} {1 + a_{j+1}^2 X_{j+1} r_j S_j}\\\end{split}\]

where

\[\begin{split}S &= \exp\left(-2\sigma_j^2k_{j,z}k_{j+1,z}\right),\\ T &= \exp\left(\dfrac{\sigma_j^2(k_{j,z}-k_{j+1,z})^2}{2}\right)\\ X_j &= \dfrac{r_j S_j + a_{j+1}^2 X_{j+1} }{1 + a_{j+1}^2 X_{j+1} r_j S_j}\\ a_j &= \exp\left(-i k_{j,z} d_j\right)\end{split}\]

Here \(S\) & \(T\) are modifications to the Fresnel coefficients to account for roughness, while \(X_j\) is the ratio of downward to upward propogating electric field intensities at interface \(j\). The algorithm is solved recursively, starting from the bottom layer and working upwards, using the boundary conditions \(R_N = 0\) and \(T_0 = 1\).

TOLAND#

Warning

This algorithm is currently under development and may not be performing correctly. Please check back later for updates.

ABELES#

Warning

This algorithm is currently under development and may not be performing correctly. Please check back later for updates.