Voigt's function, convolution of gaussian and lorentzian
#include <cerf.h>
double voigt ( double x, double sigma, double gamma );
The function voigt returns Voigt's convolution
voigt(x,sigma,gamma) = integral G(t,sigma) L(x-t,gamma) dt
of a Gaussian
G(x,sigma) = 1/sqrt(2*pi)/|sigma| * exp(-x^2/2/sigma^2)
and a Lorentzian
L(x,gamma) = |gamma| / pi / ( x^2 + gamma^2 ),
with the integral extending from -infinity to +infinity.
If sigma=0, L(x,gamma) is returned. Conversely, if gamma=0, G(x,sigma) is returned.
If sigma=gamma=0, the return value is Inf for x=0, and 0 for all other x. It is advisable to test input arguments to exclude this irregular case.
Project web site: http://apps.jcns.fz-juelich.de/libcerf
Formula (7.4.13) in Abramowitz & Stegun (1964) relates Voigt's convolution integral to Faddeeva's function w_of_z, upon which this implementation is based:
voigt(x,sigma,gamma) = Re[w(z)] / sqrt(2*pi) / |sigma|
with
z = (x+i*|gamma|) / sqrt(2) / |sigma|.
Please report bugs to the authors.
Joachim Wuttke <[email protected]>, Forschungszentrum Juelich,
based on the w_of_z implementation by Steven G. Johnson [http://math.mit.edu/~stevenj], Massachusetts Institute of Technology.
Related complex error functions in liberfc:
w_of_z\|(3), dawson\|(3), cerf\|(3), erfcx\|(3), erfi\|(3).
Copyright (c) 2013 Forschungszentrum Juelich GmbH
Software: \s-1MIT\s0 License.
This documentation: Creative Commons Attribution Share Alike.