pub struct TrueVoigt;Expand description
True Voigt profile (Gaussian ⊗ Lorentzian) via the Faddeeva function.
A · Re[w(z)] / Re[w(z₀)], with z = ((x−c) + iγ)/(σ√2) and
z₀ = iγ/(σ√2), so amplitude is the peak height (A at x=c).
Parameters (in order): [amplitude, center, sigma, gamma]
sigmais the Gaussian standard deviation,gammathe Lorentzian HWHM.γ→0⇒ Gaussian;σ→0⇒ Lorentzian. Distinct from thevoigt/pseudo_voigtkey, which is the linear pseudo-Voigt approximation.
Trait Implementations§
Source§impl Model for TrueVoigt
impl Model for TrueVoigt
Source§fn jacobian(&self, x: &[f64], params: &[f64]) -> Vec<f64>
fn jacobian(&self, x: &[f64], params: &[f64]) -> Vec<f64>
Analytical Jacobian of the true Voigt profile.
Uses the Faddeeva derivative w'(z) = −2z·w(z) + 2i/√π (from
faddeeva::w_with_derivative); by the Cauchy–Riemann equations
∂Re[w]/∂z_r = Re[w'(z)], ∂Re[w]/∂z_i = −Im[w'(z)].
For the profile f = A·w_r / peak0 (with peak0 = Re[w(0, z_i)]):
∂f/∂A = w_r / peak0
∂f/∂c = A / peak0 · dwr_dzr · (−inv) [∂z_r/∂c = −inv]
∂f/∂σ and ∂f/∂γ use the quotient rule because peak0 also changes.
w and w' are evaluated at full double precision (see the faddeeva
module), so the Jacobian carries no approximation floor.
Source§fn jacobian_into(&self, x: &[f64], params: &[f64], out: &mut [f64])
fn jacobian_into(&self, x: &[f64], params: &[f64], out: &mut [f64])
Source§fn eval_slice_into(&self, xs: &[f64], params: &[f64], out: &mut [f64])
fn eval_slice_into(&self, xs: &[f64], params: &[f64], out: &mut [f64])
out[i] = eval([xs[i]], params). Read more