lorentzian

Lorentzian line shape (absorption and dispersion).

Syntax
yabs = lorentzian(x,x0,fwhm)
yabs = lorentzian(x,x0,fwhm,diff)
yabs = lorentzian(x,x0,fwhm,diff,phase)
[yabs,ydisp] = lorentzian(...)
Description

This function returns a Lorentzian line shape with center x0 and full width at half height fwhm over the abscissa values defined in the vector x.

It returns the absorption Lorentzian in yabs and the dispersion Lorentzian in ydisp.

diff determines the derivative to compute. 0 stands for no derivative, 1 is the first one, 2 the second one, -1 indicates the integral with [eqn] as lower limit. If diff is not given, it is set to 0 by default.

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, yabs would contain the dispersion line shape.

Examples

To obtain the first derivative of a Lorentzian with centre at 2 and FWHM of 18, use

x = linspace(-300,300,1e3); x0 = 2; w = 18;
y = lorentzian(x,x0,w,1);
plot(x,y);

The Lorentzian absorption shape is normalised, so the double integral of y should give one. However, since its wings extend much beyond the borders of the above defined abscissa x, the value 1 is not reached.

trapz(x,cumtrapz(x,y))
ans =
    0.9621

Here is a plot of both the absorption and dispersion line shapes

x = linspace(-100,100,1e3); x0 = 14; w = 20;
[ya,yd] = lorentzian(x,x0,w);
plot(x,ya,x,yd);
See also

convspec, gaussian, hilberttrans, lshape, voigtian