Skip to main content

Crate spectrafit_models

Crate spectrafit_models 

Source
Expand description

spectrafit-models — analytical model kernels with exact Jacobians.

Modules§

asym_ir
Asymmetric IR band (Gaussian × logistic sigmoid).
breit_wigner
Breit-Wigner-Fano resonance.
cauchy_dispersion
Cauchy refractive-index dispersion (a + b/x² + c/x⁴).
doniach
Doniach–Šunjić asymmetric core-level lineshape (XPS).
emg
Exponentially-modified Gaussian (asymmetric tailing peak).
exp_over_linear
Exponential over a line (NIST StRD Chwirut1, Chwirut2): exp(−rate·x) / (den_const + den_lin·x).
exponential
Exponential decay and double-exponential models.
fano
Fano resonance lineshape model.
gaussian
Gaussian peak model with exact Jacobian.
gaussian2d
Axis-aligned 2-D Gaussian peak model (n_dims == 2). 2-D Gaussian kernel scaffold.
gaussian_nd
Axis-aligned N-D Gaussian peak model (parametric dimensionality). N-dimensional axis-aligned Gaussian kernel.
generalised_logistic
Generalised logistic / Richards curve (NIST StRD Rat42, Rat43): amplitude / (1 + exp(shift − rate·x))^(1/shape).
harmonic_ir
Driven damped harmonic-oscillator IR absorption.
kww
Kohlrausch–Williams–Watts stretched exponential (A·exp(−(x/τ)^β)).
log_normal
Log-normal peak (A·exp(−(ln(x/c))²/(2σ²)) for x > 0).
lorentzian
Lorentzian (Cauchy) peak model with exact Jacobian.
mgh09_rational
Kowalik–Osborne rational function (NIST StRD MGH09): amplitude · (x² + num_lin·x) / (x² + den_lin·x + den_const).
moffat
Moffat peak (A / (((x−c)/σ)²+1)^β).
pearson7
Pearson VII peak (A / [1 + ((x−c)/σ)²·(2^{1/m}−1)]^m).
polynomial
Constant and linear polynomial baseline models.
power_law_offset
Power-law with offset: amplitude · (offset + x)^(−1/shape) (Bennett5 model).
power_saturation
Power-law saturation: amplitude · (1 − (1 + rate·x/2)^(−2)) (Misra1b model).
pseudo_voigt
Pseudo-Voigt (Gaussian/Lorentzian mixture) model.
rational_cubic
Rational cubic over cubic, denominator constant pinned at 1 (NIST StRD Kirby2, Hahn1, Thurber): (a0+a1x+a2x²+a3x³) / (1+b1x+b2x²+b3x³).
saturating_exponential
Saturating exponential: amplitude · (1 − exp(−rate · x)) (BoxBOD model).
skewed_gaussian
Skewed Gaussian (error-function-modulated asymmetry).
split_gaussian
Split (asymmetric) Gaussian — different width each side (a.k.a. bi-Gaussian).
split_pearson7
Split Pearson VII (split width + exponent each side).
step
Step-function models: arctan, tanh, and erfc variants.
students_t
Student’s-t peak (A / (1+((x−c)/σ)²/ν)^((ν+1)/2)).
tauc
Tauc optical band-gap edge (A·((x−e_gap)·H(x−e_gap))^p).
voigt
Pseudo-Voigt linear-mixture model (the voigt/pseudo_voigt key).
voigt_true
True Voigt profile via the Faddeeva function (Gaussian ⊗ Lorentzian).

Traits§

Model
Core model trait implemented by every built-in kernel.

Functions§

all_model_types
Canonical list of every model-type string model_from_str can construct.
model_from_str
Dispatch a model type string to a boxed Model implementation.
model_from_str_with_dims
Dimension-aware model construction.