epyr.lineshapes.voigtian
- epyr.lineshapes.voigtian(x, center, widths, derivative=0, phase=0.0, return_both=False)[source]
Area-normalized Voigt profile - convolution of Gaussian and Lorentzian.
The Voigt profile models combined inhomogeneous (Gaussian) and homogeneous (Lorentzian) broadening mechanisms commonly found in magnetic resonance and optical spectroscopy.
Parameters:
- xarray
Abscissa points
- centerfloat
Peak center position
- widthstuple of two floats
(gaussian_fwhm, lorentzian_fwhm) - Full widths at half maximum
- derivativeint, default=0
Derivative order: - 0: Standard lineshape - 1: First derivative - 2: Second derivative - -1: Integral from -∞
- phasefloat, default=0.0
Phase rotation in radians - 0: Pure absorption - π/2: Pure dispersion
- return_bothbool, default=False
If True, return (absorption, dispersion) tuple
Returns:
- array or tuple
Voigt profile values, optionally with dispersion component
Examples:
>>> x = np.linspace(-10, 10, 1000) >>> # Equal Gaussian and Lorentzian widths >>> y = voigtian(x, 0, (4, 4)) >>> # Gaussian-dominated profile >>> y_gauss = voigtian(x, 0, (6, 2)) >>> # Lorentzian-dominated profile >>> y_lorentz = voigtian(x, 0, (2, 6))