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
File | Mode | Size |
---|---|---|
README | ||
alien | ||
asimage | ||
base | ||
build | ||
cint | ||
clib | ||
config | ||
cont | ||
dcache | ||
eg | ||
etc | ||
g3d | ||
geom | ||
geompainter | ||
gl | ||
gpad | ||
graf | ||
gui | ||
hbook | ||
hist | ||
histpainter | ||
html | ||
icons | ||
io | ||
krb5auth | ||
mac | ||
main | ||
man | ||
math | ||
matrix | ||
mc | ||
meta | ||
minuit | ||
mysql | ||
net | ||
newdelete | ||
pgsql | ||
physics | ||
postscript | ||
proof | ||
proofd | ||
proofplayer | ||
pythia | ||
pythia6 | ||
rfio | ||
rint | ||
roofit | ||
roofitcore | ||
rootd | ||
roots | ||
rootx | ||
sapdb | ||
srputils | ||
table | ||
test | ||
thread | ||
tree | ||
treeplayer | ||
treeviewer | ||
tutorials | ||
unix | ||
utils | ||
venus | ||
vms | ||
win32 | ||
win32gdk | ||
winnt | ||
x11 | ||
x11ttf | ||
x3d | ||
zip | ||
.cvsignore | -rw-r--r-- | 33 bytes |
LICENSE | -rw-r--r-- | 1.6 KB |
Makefile | -rw-r--r-- | 21.4 KB |
configure | -rwxr-xr-x | 54.0 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...