mcalf.profiles.voigt.voigt(x, a, b, s, g, d, clib=True)[source]

Voigt function with background.

  • x (numpy.ndarray) – Wavelengths to evaluate Voigt function at.

  • a (float) – Amplitude of the Lorentzian.

  • b (float) – Central line core.

  • s (float) – Sigma (for Gaussian).

  • g (float) – Gamma (for Lorentzian).

  • d (float) – Background.

  • clib (bool, optional, default=True) – Whether to use the complied C library or a slower Python version. If using the C library, the accuracy of the integration is reduced to give the code a significant speed boost. Python version can be used when speed is not a priority. Python version will remove deviations that are sometimes present around the wings due to the reduced accuracy.


result – The value of the Voigt function here.

Return type

numpy.ndarray, shape=`x.shape`

See also


Base Voigt function with no background.


Two Voigt functions added together.


Two Voigt function and a background added together.


More information on the Voigt function can be found here: https://en.wikipedia.org/wiki/Voigt_profile