Navigation
ESC
[↑↓] Navigate [↵] Select
Command Palette

Mathematical Algorithms & Minimization

A technical review of the computational methods used in XPS Analyzer for non-linear optimization and lineshape fitting.

Technical Stack

Numerical Methods Non-linear Optimization

Resources

Numerical Background Modeling

The raw photoelectron spectrum consists of discrete characteristic peaks superimposed on a continuous background of inelastically scattered electrons. Precise subtraction of this background is the most critical precursor to quantitative analysis. XPS Analyzer implements three mathematical approaches to background subtraction.

The Shirley Integral (1972)

The most commonly utilized algorithm in surface spectroscopy, the Shirley background, assumes that the intensity of the scattered background at any energy EE is directly proportional to the total integrated intensity of the primary photoelectron peak at higher kinetic energies.

Because the calculation of the background B(E)B(E) depends on the area of the peak S(E)=I(E)B(E)S(E) = I(E) - B(E), the solution requires an iterative numerical integral:

B(E)=Bmin+(BmaxBmin)EEmaxS(E)dEEminEmaxS(E)dEB(E) = B_{min} + (B_{max} - B_{min}) \frac{\int_{E}^{E_{max}} S(E') dE'}{\int_{E_{min}}^{E_{max}} S(E') dE'}

The implementation in XPS Analyzer iterates this integral B(k)B^{(k)} using NumPy vectorization. The algorithm evaluates convergence by measuring the maximum absolute difference between successive iterations:

maxB(k)B(k1)<tol×max(I)\max|B^{(k)} - B^{(k-1)}| < \text{tol} \times \max(I)

The default tolerance (tol) is set to 10510^{-5}, typically achieving convergence in fewer than 10 iterations.

The Tougaard Universal Cross-Section (1997)

For spectra exhibiting a broad inelastic tail or for transition metals, the Shirley method may fail to converge or incorrectly define the peak area. The Tougaard algorithm provides a more physically rigorous model by defining an inelastic scattering cross-section K(T)K(T), where TT is the energy loss.

B(E)=EEmaxI(E)K(EE)dEB(E) = \int_{E}^{E_{max}} I(E') K(E' - E) dE'

The “universal” cross-section is defined mathematically as:

K(T)=BT(CT)2+D2K(T) = \frac{B \cdot T}{(C - T)^2 + D^2}

XPS Analyzer implements four variants of the Tougaard cross-section (Universal, B, C, D, and D*), allowing for adjustment of the B,C,B, C, and DD parameters depending on whether the substrate is a polymer, an oxide, or a pure metal (defaulting to the universal values B=2866,C=1643,D=1B=2866, C=1643, D=1 eV2^2).

Lineshape Convolutions

Following background subtraction, the discrete photoelectron peaks are mathematically isolated. However, a pure atomic transition does not produce a delta function. The observed lineshape is broadened by two distinct physical processes, which are modeled via mathematical convolutions.

Voigt doublet peak deconvolution on a Ti 2p spectrum using Levenberg-Marquardt optimization

Gaussian and Lorentzian Profiles

Instrumental Broadening: The finite resolution of the X-ray source and the hemispherical analyzer introduces a normally distributed uncertainty, modeled as a Gaussian profile G(E)G(E):

G(E)=Aexp[(EE0)22σ2]G(E) = A \exp\left[-\frac{(E - E_0)^2}{2\sigma^2}\right]

Lifetime Broadening: The Heisenberg Uncertainty Principle dictates that the finite lifetime of the core hole created during photoemission broadens the energy state. This natural line width is modeled by a Cauchy-Lorentz distribution L(E)L(E):

L(E)=Aγ(EE0)2+γ2L(E) = \frac{A \gamma}{(E - E_0)^2 + \gamma^2}

Where γ\gamma is the half-width at half-maximum (HWHM), and σ\sigma relates to the Gaussian full-width at half-maximum (FWHM) via FWHMG=2.355σFWHM_G = 2.355\sigma.

The Voigt Convolution

To accurately model a real XPS spectrum, the Gaussian and Lorentzian profiles must be convoluted into a Voigt profile V(E)V(E):

V(E)=G(E)L(EE)dEV(E) = \int_{-\infty}^{\infty} G(E') L(E - E') dE'

Because the Voigt integral lacks an analytic solution, XPS Analyzer computes the convolution numerically using the Faddeeva function via scipy.special.voigt_profile, providing mathematically rigorous models for transition metals like Titanium (Ti4+Ti^{4+}) and Bismuth (Bi3+Bi^{3+}).

Non-Linear Optimization

The complete XPS spectrum is defined as the sum of NN discrete Voigt profiles plus the background. To determine the exact position E0E_0, amplitude AA, σ\sigma, and γ\gamma for each peak, the software minimizes the residual sum of squares between the theoretical model f(Ei;θ)f(E_i; \theta) and the experimental data yiy_i.

χ2=i[yif(Ei;θ)σi]2\chi^2 = \sum_i \left[ \frac{y_i - f(E_i; \theta)}{\sigma_i} \right]^2

This minimization is performed using the Levenberg-Marquardt algorithm. When fitting spin-orbit doublets (e.g., Ti 2p3/2Ti\ 2p_{3/2} and Ti 2p1/2Ti\ 2p_{1/2}), the algorithm applies strict bounds and parameter constraints to enforce the quantum mechanical area ratios (2:1) and the exact energy splitting (5.7\approx 5.7 eV), preventing mathematical overfitting and ensuring the physical validity of the deconvolution.