Barak 0.3.2 documentation

barak.voigt.voigt

«  barak.virial.find_rvT   ::   Contents   ::   barak.voigt.voigt_slow  »

barak.voigt.voigt

barak.voigt.voigt(a, u)[source]

Compute the Voigt function using a fast approximation.

Parameters :

a : float

Ratio of Lorentzian to Gaussian linewidths (see below).

u : array of floats, shape (N,)

The frequency or velocity offsets from the line centre, in units of the FWHM of the Gaussian broadening (see below).

Returns :

H : array of floats, shape (N,)

The Voigt function.

Notes

The Voigt function is useful for calculating the optical depth as function of frequency for an absorption transition associated with an atom or ion.

The Voigt function H(a, u) is related to the Voigt profile V(x, sigma, gamma):

V(x, sigma, gamma) = H(a, u) / (sqrt(2*pi) * sigma)

where:

a = gamma / (sqrt(2) * sigma)
u = x / (sqrt(2) * sigma)

The Voigt profile is convolution of a Gaussian profile:

G(x, sigma) = exp(-0.5 * (x / sigma)^2) / (sigma * sqrt(2*pi))

and a Lorentzian profile:

L(x, gamma) = gamma / ((x^2 + gamma^2) * pi)

It is normalised; the integral of V over all x is 1.

This function uses a Taylor approximation to the Voigt function for 0 < a < 0.1. (Harris 1948, ApJ, 108, 112). Relative error with respect to voigt_wofz is < 10^-4.9 for a < 0.1. For larger a the exact calculation is done in voigt_wofz.

«  barak.virial.find_rvT   ::   Contents   ::   barak.voigt.voigt_slow  »