Voigtian line shape (absorption and dispersion).
ya = voigtian(x,x0,fwhmGL) ya = voigtian(x,x0,fwhmGL,diff) ya = voigtian(x,x0,fwhmGL,diff,phase) [ya,yd] = voigtian(...)
This function returns a Voigtian line shape with center x0
and component full widths at half height fwhmGL
over the abscissa values defined in the vector x
. A Voigtian line shape is the convolution of a Gaussian and Lorentzian line shape.
fwhmGL
specifies the full width at half height for the two convolution components fwhmGL = [fwhmGauss fwhmLorentz]
. If both are non-zero, a Voigtian line shape results. There are two limiting cases: If the first element in fwhmGL
is zero, you get a pure Lorentzian. If the second element is zero, you get a pure Gaussian.
diff
determines the derivative to compute. 0 stands for no derivative, 1 is the first one, 2 the second one, and so on. -1 indicates the integral with as lower limit. If diff
is not given, it defaults to 0.
The function returns the absorption line shape in ya
and the 90-degree phase-shifted dispersion line shape in yd
.
If phase
is given, the absorption and dispersion line shapes are both rotated the by the given amount (in radians). E.g., with phase=pi/2
, ya
will contain the dispersion line shape.
For long x
vectors, the convolution takes time. If the performance is critical, pseudo-Voigt line shapes (linear combination of Gaussian and Lorentzian) can be computed with the function lshape.
To obtain a Voigtian with center at 350 mT, a Gaussian FWHM of 2 mT, and a Lorentzian FWHM of 1 mT, use
x0 = 350; x = x0+50*linspace(-1,1,1e3); fwhmGL = [2 1]; y = voigtian(x,x0,fwhmGL); plot(x,y);
The Voigtian is normalized, i.e. its integral is one.
sum(y)*(x(2)-x(1))
ans = 0.9936
convspec, gaussian, hilberttrans, lorentzian, lshape