Revision 6157f21ca5aa64ca9b22fb60e3109bbf2452e952 authored by Rene Brun on 16 August 2002, 13:43:10 UTC, committed by Rene Brun on 16 August 2002, 13:43:10 UTC
Double_t TMath::Voigt(Double_t x, Double_t sigma, Double_t lg, Int_t R)
   // Computation of Voigt function (normalised).
   // Voigt is a convolution of
   // gauss(x) = 1/(sqrt(2*pi)*sigma) * exp(x*x/(2*sigma*sigma)
   // and
   // lorentz(x) = (1/pi) * (lg/2) / (x*x + g*g/4)
   // functions.

   // The Voigt function is known to be the real part of Faddeeva function also
   // called complex error function [2].

   // The algoritm was developed by J. Humlicek [1].
   // This code is based on fortran code presented by R. J. Wells [2].
   // Translated and adapted by Miha D. Puc

   // To calculate the Faddeeva function with relative error less than 10^(-R).
   // R can be set by the the user subject to the constraints 2 <= R <= 5.

   // [1] J. Humlicek, JQSRT, 21, 437 (1982).
   // [2] R. J. Wells, Rapid Approximation to the Voigt/Faddeeva Function and
   // it's Derivatives.

From original mail by miha.puc@marvin.fmf.uni-lj.si
Voigt function is very common in optical spectrometry (astronomy, ..) and
also in X-ray spectrometry. I found it's quite difficult to get a
good and fast approximation algorthm and I think having voigt in TMath
would be of great value to many. For this reason and since I already have
the code I'm sending it to you to consider.


git-svn-id: http://root.cern.ch/svn/root/trunk@5130 27541ba8-7e3a-0410-8455-c3a389f83636
1 parent cc6726b
History
File Mode Size
src
Module.mk -rw-r--r-- 1.2 KB

back to top