SpectraUtils
SpectraUtils.jl provides composable building blocks for working with spectral line profiles. The package combines analytic line-shape functions, a convenient Line container, and physical helper formulas for estimating linewidths.
Reference
SpectraUtils.SpectraUtilsSpectraUtils.DopplerFreeSpectraUtils.GaussianSpectraUtils.LineSpectraUtils.LineShapeSpectraUtils.LorentzianSpectraUtils.SmithSpectraUtils.VoigtSpectraUtils.VoigtApprxSpectraUtils.gamma_hard_sphereSpectraUtils.gamma_hard_sphereSpectraUtils.gaussianSpectraUtils.lorentzianSpectraUtils.sigma_dopplerSpectraUtils.sigma_dopplerSpectraUtils.voigt
SpectraUtils.SpectraUtils — Module
SpectraUtilsUtilities for constructing and evaluating spectroscopy line models. The package provides line-shape definitions, convenience helpers for bundling parameters into reusable Line objects, and utilities for estimating linewidths from physical conditions.
SpectraUtils.DopplerFree — Type
DopplerFree(depth, envelop, dip)Callable representation of a Doppler-free spectral profile. The resulting shape multiplies a broad envelope envelop(x) by a saturation dip, returning envelop(x) * (1 - depth * dip(x)) when evaluated. The envelop and dip arguments can be any callable line-shape models (for example, Gaussian or Lorentzian).
SpectraUtils.Gaussian — Type
Gaussian(sigma)Callable representation of a Gaussian profile with standard deviation sigma. Call shape(x) to evaluate the profile at offset x.
SpectraUtils.Line — Type
Line(amplitude, position, shape)Bundle a spectral line definition with an amplitude, position, and callable shape. Each field may be either a numeric value or a function that consumes a parameter set when the line is evaluated. Call the resulting object as line(x, p) to evaluate the profile at a scalar position and as line(xs, p) to broadcast over a vector of positions.
SpectraUtils.LineShape — Type
Abstract supertype for supported line-shape models.
SpectraUtils.Lorentzian — Type
Lorentzian(hwhm)Callable representation of a Lorentzian profile with half-width at half-maximum hwhm. Invoke the object as shape(x) to evaluate the profile at offset x.
SpectraUtils.Smith — Type
Smith(cross_relaxation, sigma, gamma)Cross-relaxation–broadened line shape following Smith et al. (Phys. Rev. Lett. 26, 740). The profile smoothly blends a normalized Lorentzian–Gaussian product with a Gaussian term according to the dimensionless cross-relaxation factor cross_relaxation ∈ [0, 1]:
(1 - c) * e^{-(γ/2σ)^2}/erfc(γ/2σ) * (γ/π)/(x^2 + γ^2) * e^{-x^2/4σ^2}
+ c * Gaussian(x, σ)The parameters are the Gaussian standard deviation sigma, the Lorentzian half-width at half-maximum gamma, and the mixing factor cross_relaxation. The analytic prefactor ensures the profile integrates to one for any parameter values.
SpectraUtils.Voigt — Method
Voigt(sigma, gamma)Callable representation of the full Voigt profile with standard deviation sigma and Lorentzian half-width gamma. Evaluate using shape(x) to compute the line shape at offset x.
SpectraUtils.VoigtApprx — Type
VoigtApprx(sigma, gamma)Pseudo-Voigt approximation that blends Gaussian and Lorentzian profiles with standard deviation sigma and half-width at half-maximum gamma. Evaluate instances as shape(x) to compute the approximated Voigt profile at offset x.
SpectraUtils.gamma_hard_sphere — Method
gamma_hard_sphere(p, T; μ, cs)Compute the Lorentzian half-width at half-maximum (in cm⁻¹) under the hard-sphere collisional model. The calculation uses the pressure p (Pa), temperature T (K), reduced mass μ (kg), and average relative speed cs (m/s).
SpectraUtils.gaussian — Method
Evaluate the Gaussian profile with standard deviation σ.
SpectraUtils.lorentzian — Method
Evaluate the Lorentzian profile with half-width at half-maximum γ.
SpectraUtils.sigma_doppler — Method
sigma_doppler(f0, T; m)Return the Doppler Gaussian standard deviation for a transition at frequency f0 and temperature T (in kelvin). The molecular mass m is supplied as a keyword argument and should be expressed in kilograms.
SpectraUtils.voigt — Method
Evaluate the full Voigt profile for standard deviation σ and γ.