ComplexErrorFunctionRelated Type

Contains functions that are related to the complex error function of complex argument.

Citation:

S. G. Johnson, J. Wuttke: libcerf, numeric library for complex error functions, see .

Most function evaluations in this library rely on Faddeeva's function w(z). This function has been reimplemented from scratch by Steven G.Johnson; project web site http://ab-initio.mit.edu/Faddeeva. The implementation partly relies on algorithms from the following publications:

References:

Walter Gautschi, Efficient computation of the complex error function, SIAM J. Numer. Anal. 7, 187 (1970).

G. P. M. Poppe and C. M. J. Wijers, More efficient computation of the complex error function, ACM Trans. Math. Soft. 16, 38 (1990).

Mofreh R. Zaghloul and Ahmed N. Ali, Algorithm 916: Computing the Faddeyeva and Voigt Functions, ACM Trans. Math. Soft. 38, 15 (2011).

Constructors

Constructor Description

ComplexErrorFunctionRelated()

Full Usage: ComplexErrorFunctionRelated()

Static members

Static member Description

ComplexErrorFunctionRelated.CDawson(z)

Full Usage: ComplexErrorFunctionRelated.CDawson(z)

Parameters:
    z : Complex - The complex argument z.

Returns: Complex Value of Dawson's integral D(z) = sqrt(pi)/2 * exp(-z^2) * erfi(z).

Dawson's integral D(z) = sqrt(pi)/2 * exp(-z^2) * erfi(z).

z : Complex

The complex argument z.

Returns: Complex

Value of Dawson's integral D(z) = sqrt(pi)/2 * exp(-z^2) * erfi(z).

ComplexErrorFunctionRelated.Cerf(z)

Full Usage: ComplexErrorFunctionRelated.Cerf(z)

Parameters:
    z : Complex - The complex argument.

Returns: Complex Value of the complex error function of z.

Complex error function.

z : Complex

The complex argument.

Returns: Complex

Value of the complex error function of z.

ComplexErrorFunctionRelated.Cerfc(z)

Full Usage: ComplexErrorFunctionRelated.Cerfc(z)

Parameters:
    z : Complex - The complex argument z.

Returns: Complex Value of the complex complementary error function cerfc(z) = 1 - cerf(z).

The complex complementary error function cerfc(z) = 1 - cerf(z).

z : Complex

The complex argument z.

Returns: Complex

Value of the complex complementary error function cerfc(z) = 1 - cerf(z).

ComplexErrorFunctionRelated.Cerfcx(z)

Full Usage: ComplexErrorFunctionRelated.Cerfcx(z)

Parameters:
    z : Complex - The complex argument z.

Returns: Complex Value of the underflow-compensating function cerfcx(z) = exp(z^2)*cerfc(z).

The underflow-compensating function cerfcx(z) = exp(z^2)*cerfc(z).

z : Complex

The complex argument z.

Returns: Complex

Value of the underflow-compensating function cerfcx(z) = exp(z^2)*cerfc(z).

ComplexErrorFunctionRelated.Cerfi(z)

Full Usage: ComplexErrorFunctionRelated.Cerfi(z)

Parameters:
    z : Complex - The complex argument z.

Returns: Complex Value of the imaginary error function cerfi(z) = -i cerf(iz).

The imaginary error function cerfi(z) = -i cerf(iz).

z : Complex

The complex argument z.

Returns: Complex

Value of the imaginary error function cerfi(z) = -i cerf(iz).

ComplexErrorFunctionRelated.Dawson(x)

Full Usage: ComplexErrorFunctionRelated.Dawson(x)

Parameters:
    x : float - The real argument x.

Returns: float Value of Dawson's integral D(x) = sqrt(pi)/2 * exp(-x^2) * erfi(x) for real values.

Dawson's integral D(x) = sqrt(pi)/2 * exp(-x^2) * erfi(x) for real values.

x : float

The real argument x.

Returns: float

Value of Dawson's integral D(x) = sqrt(pi)/2 * exp(-x^2) * erfi(x) for real values.

ComplexErrorFunctionRelated.Erfcx(x)

Full Usage: ComplexErrorFunctionRelated.Erfcx(x)

Parameters:
    x : float - The real argument x.

Returns: float Value of the underflow-compensating function erfcx(z) = exp(x^2)*erfc(x).

The underflow-compensating function erfcx(x) = exp(x^2)*erfc(x) for real arguments.

x : float

The real argument x.

Returns: float

Value of the underflow-compensating function erfcx(z) = exp(x^2)*erfc(x).

ComplexErrorFunctionRelated.Erfi(x)

Full Usage: ComplexErrorFunctionRelated.Erfi(x)

Parameters:
    x : float - The real argument x.

Returns: float Value of the imaginary error function erfi(x) = -i cerf(ix).

The imaginary error function erfi(x) = -i cerf(ix).

x : float

The real argument x.

Returns: float

Value of the imaginary error function erfi(x) = -i cerf(ix).

ComplexErrorFunctionRelated.Im_w_of_z(x, y)

Full Usage: ComplexErrorFunctionRelated.Im_w_of_z(x, y)

Parameters:
    x : float - The real part of the complex argument z.
    y : float - The imaginary part of the complex argument z.

Returns: float Imaginary part of Faddeeva's scaled complex error function w(z) = exp(-z^2) erfc(-iz).

Faddeeva's scaled complex error function w(z) = exp(-z^2) erfc(-iz), returning the purely imaginary result as a real number.

x : float

The real part of the complex argument z.

y : float

The imaginary part of the complex argument z.

Returns: float

Imaginary part of Faddeeva's scaled complex error function w(z) = exp(-z^2) erfc(-iz).

ComplexErrorFunctionRelated.Re_w_of_z(x, y)

Full Usage: ComplexErrorFunctionRelated.Re_w_of_z(x, y)

Parameters:
    x : float - The real part of the complex argument z.
    y : float - The imaginary part of the complex argument z.

Returns: float Real part of Faddeeva's scaled complex error function w(z) = exp(-z^2) erfc(-iz).

Faddeeva's scaled complex error function w(z) = exp(-z^2) erfc(-iz), returning the real part of the result as a real number.

x : float

The real part of the complex argument z.

y : float

The imaginary part of the complex argument z.

Returns: float

Real part of Faddeeva's scaled complex error function w(z) = exp(-z^2) erfc(-iz).

ComplexErrorFunctionRelated.Voigt(x, sigma, gamma)

Full Usage: ComplexErrorFunctionRelated.Voigt(x, sigma, gamma)

Parameters:
    x : float - The real argument x.
    sigma : float - The parameter sigma (of the Gaussian).
    gamma : float - The parameter gamma (of the Lorentzian).

Returns: float The value of the Voigt function, a convolution of a Gaussian and a Lorentzian probability density function.

The convolution of a Gaussian and a Lorentzian probability density function.

x : float

The real argument x.

sigma : float

The parameter sigma (of the Gaussian).

gamma : float

The parameter gamma (of the Lorentzian).

Returns: float

The value of the Voigt function, a convolution of a Gaussian and a Lorentzian probability density function.

ComplexErrorFunctionRelated.VoigtHalfWidthHalfMaximum(sigma, gamma)

Full Usage: ComplexErrorFunctionRelated.VoigtHalfWidthHalfMaximum(sigma, gamma)

Parameters:
    sigma : float - The parameter sigma (of the Gaussian).
    gamma : float - The parameter gamma (of the Lorentzian).

Returns: float The half width at half maximum of the Voigt profile, see ComplexErrorFunctionRelated.Voigt.

The half width at half maximum of the ComplexErrorFunctionRelated.Voigt profile.

sigma : float

The parameter sigma (of the Gaussian).

gamma : float

The parameter gamma (of the Lorentzian).

Returns: float

The half width at half maximum of the Voigt profile, see ComplexErrorFunctionRelated.Voigt.

InvalidProgramException

ComplexErrorFunctionRelated.VoigtHalfWidthHalfMaximumApproximation(sigma, gamma)

Full Usage: ComplexErrorFunctionRelated.VoigtHalfWidthHalfMaximumApproximation(sigma, gamma)

Parameters:
    sigma : float - The parameter sigma (of the Gaussian).
    gamma : float - The parameter gamma (of the Lorentzian).

Returns: float The half width at half maximum of the Voigt profile, see ComplexErrorFunctionRelated.Voigt.

An approximation formula for the half width at half maximum of the ComplexErrorFunctionRelated.Voigt profile. The maximal relative error is 0.0216%. The error is vanishing in the limiting cases sigma>>gamma and gamma>>sigma.

References:

[1] Olivero, Longbothum, Journal of Quantitative Spectroscopy and Radiative Transfer, 1977, 17:233

D. Lellinger: The constant C1 was calculated from C2 in order to ensure asymptotic correct behavior. C2 was chosen so that the maximum relative error is symmetrically around zero.

sigma : float

The parameter sigma (of the Gaussian).

gamma : float

The parameter gamma (of the Lorentzian).

Returns: float

The half width at half maximum of the Voigt profile, see ComplexErrorFunctionRelated.Voigt.

InvalidProgramException

ComplexErrorFunctionRelated.W_of_z(z)

Full Usage: ComplexErrorFunctionRelated.W_of_z(z)

Parameters:
    z : Complex - The complex argument z.

Returns: Complex Value of Faddeeva's scaled complex error function w(z) = exp(-z^2) erfc(-iz).

Faddeeva's scaled complex error function w(z) = exp(-z^2) erfc(-iz).

z : Complex

The complex argument z.

Returns: Complex

Value of Faddeeva's scaled complex error function w(z) = exp(-z^2) erfc(-iz).