epyr.lineshapes.gaussian
- epyr.lineshapes.gaussian(x, center, width, derivative=0, phase=0.0, return_both=False)[source]
Area-normalized Gaussian lineshape with derivatives and phase rotation.
The Gaussian profile represents inhomogeneous broadening from statistical distributions of local fields or magnetic environments.
Parameters:
- xarray
Abscissa points
- centerfloat
Peak center position
- widthfloat
Full width at half maximum (FWHM)
- 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
Gaussian values, optionally with dispersion component
Examples:
>>> x = np.linspace(-10, 10, 1000) >>> # Standard absorption Gaussian >>> y = gaussian(x, 0, 4) >>> # First derivative >>> dy = gaussian(x, 0, 4, derivative=1) >>> # Dispersion mode >>> disp = gaussian(x, 0, 4, phase=np.pi/2) >>> # Both absorption and dispersion >>> abs_part, disp_part = gaussian(x, 0, 4, return_both=True)