nmrglue.analysis.lineshapes1d.sim_lorentz_gamma

nmrglue.analysis.lineshapes1d.sim_lorentz_gamma(x, x0, gamma)[source]

Simulate a Lorentzian lineshape with unit height at the center.

Simulates discrete points of the continuous Cauchy-Lorentz (Breit-Wigner) distribution with unit height at the center. Gamma (the half-width at half-maximum, HWHM) is used as the scale parameter.

Functional form:

f(x; x0, gamma) = g ^ 2 / ((x-x0) ^ 2 + g ^ 2)

Parameters
xndarray

Array of values at which to evaluate distribution.

x0float

Center of the distribution.

gammafloat

Scale parameter, half-width at half-maximum, of distribution.

Returns
fndarray

Distribution evaluated at points in x.