Notes: An assessment of some closed-form expressions for the Voigt function III: Combinations of the Lorentz and Gauss functions
Franz Schreier

TL;DR
This paper reviews various pseudo-Voigt functions, which are linear combinations of Lorentz and Gauss functions, assessing their accuracy as approximations for the Voigt function through comparison with reference values.
Contribution
It provides a comprehensive review and comparison of multiple closed-form pseudo-Voigt approximations for the Voigt function, highlighting their accuracy limitations.
Findings
Relative errors can reach several percent
Some approximations show significant deviations from reference values
The review clarifies the accuracy trade-offs of different formulas
Abstract
A variety of "pseudo-Voigt" functions, i.e. a linear combination of the Lorentz and Gauss function (occasionally augmented with a correction term), have been proposed as a closed-form approximation for the convolution of the Lorentz and Gauss function known as the Voigt function. First, a compact review of several approximations using a consistent notation is presented. The comparison with accurate reference values indicates relative errors as large as some percent.
| 10.0 | 1.0 | 0.001 | |
|---|---|---|---|
| Kielkopf | 459 | 424 | 393 |
| Matveev | 451 | 437 | 392 |
| hum1wei24 | 252 | 326 | 332 |
| weideman24 | 803 | 801 | 809 |
| zpf16h | 693 | 694 | 695 |
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Notes:
An assessment of some closed-form expressions for the Voigt function III:
Combinations of the Lorentz and Gauss functions
Franz Schreier
DLR — German Aerospace Center, Remote Sensing Technology Institute,
Oberpfaffenhofen, 82234 Weßling, Germany
Abstract
A variety of “pseudo-Voigt” functions, i.e. a linear combination of the Lorentz and Gauss function (occasionally augmented with a correction term), have been proposed as a closed-form approximation for the convolution of the Lorentz and Gauss function known as the Voigt function. First, a compact review of several approximations using a consistent notation is presented. The comparison with accurate reference values indicates relative errors as large as some percent.
keywords:
Complex error function; Complex probability function; Plasma dispersion function; Faddeyeva function; Pseudo-Voigt function
PACS:
02.30.Mv Approximations and expansions
02.60.-x Numerical approximation and analysis
02.70.-c Computational techniques
††journal: J. Quant. Spectros. & Rad. Transfer, received December 2018, accepted January 2019; doi: 10.1016/j.jqsrt.2019.01.017
1 Introduction
Rapid yet accurate computation of the Voigt function [1] is a challenge in many fields of the physical sciences. Because the convolution integral of a Lorentz and Gauss function does not have an analytical solution, approximations have been discussed in numerous papers. Whereas many modern “state-of-the art” algorithms evaluate the closely related complex error function (also known as complex probability function, plasma dispersion function, or Fadde(y)eva function, cf. e.g., 2, 3, 4) utilizing sophisticated numerical techniques, “simple” closed-form expressions still appear to be attractive.
Linear combinations of the Lorentz and/or Gauss functions have been suggested by several authors. Flores-Llamas et al. [5] proposed a sum of the Lorentzian and its derivatives and Melcher and Gerth [6] fitted the Voigt functions by “generalized Lorentz functions”. McLean et al. [7] have further developed an approximation originally suggested by Martin and Puerta [8, 9], Puerta and Martin [10, 11] and proposed a superposition of four Lorentzians [for a recent assessment see 12]. Linear combinations of a Lorentz and Gauss function (sometimes called “pseudo-Voigt” function and occasionally including a correction term) have been suggested or used by Whiting [13], Matveev [14], Peyre and Principi [15], Kielkopf [16], Wertheim et al. [17], Thompson et al. [18], Teodorescu et al. [19], Ida et al. [20] and Liu et al. [21].
In this note we present an assessment of closed-form expressions for the Voigt function using a combination of Lorentz and Gauss functions. After a short review of the basic definitions in the next subsection, we describe several combinations using a consistent notation (in chronological order). The results of our tests using an accurate Voigt function code as reference are presented in Section 3. The codes have been implemented in Python and a Scientific Python (scipy.org) implementation has been used as a reference. In the final Section 4 we provide a summary and some conclusions.
2 Theory
2.1 The Voigt function
The Voigt function (normalized to ) is defined by
[TABLE]
where is a measure of the distance to the center peak, and is essentially the ratio of the Lorentzian and Gaussian width, . At the line center the Voigt function can be expressed as the exponentially scaled complementary error function
[TABLE]
The Voigt function is symmetric, i.e. and essentially reduces to the Lorentz function for large . The Voigt function is identical to the real part of the complex function
[TABLE]
2.2 The Whiting [13] approximation
To our knowledge the first approximation of the Voigt function using a combination of Lorentz and Gauss functions
[TABLE]
with
[TABLE]
is due to Whiting [13]. The weight factor is given by the ratio of the widths of the Lorentz and Voigt profiles or
[TABLE]
An improved approximation is obtained by adding a correction term (i.e. ) that is given by “kind of Lorentzians and Gaussians”,
[TABLE]
By definition, the approximation (5) is exact in the center at . Furthermore, both approximations are exact for the limiting cases of pure Lorentz and Gauss functions. According to the author, “this approximation matches the Voigt profile within 5 per cent at worst and is generally within 3 per cent or less.”
2.3 The Matveev [14] approximation
The approximation is given by
[TABLE]
with a correction term
[TABLE]
The weight is defined as in (8) and the half width is given by a refinement of Whiting’s approximation (9)111Note that a prefactor for the correction term is missing in Matveev’s Eq. (5) and is correctly inserted in Titov and Haus [22, after Eq. (12)]. Furthermore, the factor in (12) is not given in Titov and Haus [22, Eq. (12c)].
[TABLE]
Without correction term (12) Matveev [14] reports a “greatest error of at and ”. With correction the maximum error at the line center does not exceed , and for the error lies within the limits of ” for any . In the intermediate frequency regime “the error nowhere exceeds .”
2.4 The Kielkopf [16] approximation
Without correction term this approximation is identical to (5), but with the weight and half width defined as
[TABLE]
The correction contains the difference of a Gaussian and Lorentzian multiplied with a rational function of (see Online B for numerical values)
[TABLE]
This approximation “is accurate to the order of 0.0001 of the peak value of the function”.
2.5 The Thompson et al. [18] approximation
In contrast to the three approximations discussed so far the weight factors of the Thompson et al. [18] (and Liu et al. [21], next subsection) approaches are defined by power series of . The pseudo-Voigt function is written as
[TABLE]
with the Voigt half width and weight (see Online B)
[TABLE]
According to Ida et al. [20] the maximum deviation of about is found at .
2.6 The Liu et al. [21] approximation
Introducing a dimensionless parameter and approximating the weights (see Eq. (34) in the Online Appendix) as
[TABLE]
the pseudo-Voigt function is written as
[TABLE]
with the half width given by the Olivero and Longbothum [23] approximation
[TABLE]
According to the abstract [21] “the maximum errors of width, area, and peak … are 0.01%, 0.2%, and 0.55%, respectively.”
3 Results
Ignoring the correction terms Eqs. (10), (12), and (17), all algorithms use a weighted sum of the Lorentz and Gauss function, where the Lorentz weight tends to one for and zero for . Fig. 1 compares the weights of the Lorentz function for all five approximations. The weights of Whiting and Matveev are identical by construction, Eq. (8), and the Thompson et al. and Liu et al. weights appear to be very similar (with differences for small and large only). For (i.e. equal width of the Lorentz and Gauss function) all weights are approximately 0.7. Note that except for Liu et al. the Gaussian weight is simply given by .
As discussed in Schreier [24] and in our previous assessments of simple closed-form approximations of the Voigt function [25, 26, 12], the range of values encountered in molecular spectroscopy and atmospheric and astrophysical applications spans many orders of magnitude. In Fig. 2 (left) we compare the pseudo-Voigt approximations with reference values for , Eq. (3), obtained with the wofz code (algorithm originally based on Poppe and Wijers [27, 28] and later refined with ideas from Zaghloul and Ali [29]; Scientific Python (http://scipy.org) implementation scipy.special.wofz with at least 13 significant digits according to the documentation).
The function values shown on the left appear to be in reasonably good agreement with the reference. However, significant problems show up in the relative errors (right side) and for all approximations the maximum error is larger than 1 percent.
In the line center () the Whiting and Kielkopf approximations are exact by definition (assuming that the exponentially scaled complementary error function , Eq. (2), is evaluated exactly). The other approximations have errors of some percent for , but smaller errors for smaller and larger . Note that in the line center the Whiting and Kielkopf corrections vanish, i.e. , in contrast to the Matveev correction.
In the line wings only Matveev’s approximation (with and without correction) has relative errors decreasing with increasing . Evaluating the Voigt function for very large ( for and for ) indicates that for all other approximations the errors become constant for large . For Kielkopf this asymptotic error is about for and for and .
For small Matveev’s approximation appears to be superior (with errors less than a few percent), however, for the correction term worsens the accuracy, and the results shown in the top of Fig. 2 have been obtained without the correction (12). For Kielkopf and Matveev, the largest errors occur for intermediate values of , whereas the other approximations always fail for large .
The contour plots of relative errors shown in Fig. 3 essentially confirm these findings. Except for the Liu et al. [21] Lorentz-Gauss combination all approximations have at least a small region where the relative accuracy is better than (see [24] for a discussion of the criterion). For Whiting and Kielkopf a relative high accuracy is achieved near the origin for small and large , for Matveev and Thompson only for small .
The maximum relative error indicated in the title of all subplots identifies Kielkopf’s code (with correction) as the most accurate approximation. However, this maximum error is relatively large for modern standards (about six percent in the wings), and for small Matveev’s code appears to be better.
Despite the significant accuracy problems of all pseudo-Voigt approximations it is nevertheless instructive to test the numerical performance of the codes. Simple tests within the IPython interpreter [30] indicate that the Kielkopf and Matveev approximations are somewhat slower than the optimized combination of the Humlíček [31] and Weideman [32] rational approximations [24]. However, evaluation of HNO3 cross sections in the microwave for a series of pressures and temperatures corresponding to Earth’s atmosphere in the altitude range is about a factor two slower with these two pseudo-Voigt approximations compared to the Humlíček–Weideman combination. For details see the online appendix D.
4 Summary and Conclusions
Closed-form expressions for the Voigt function based on combinations of Lorentz- and Gauss-type functions show significant accuracy problems, with relative errors in the percent range. Note that in this study we have only considered “pseudo-Voigt” approximations based on an analytical, closed-form expression for the weight of the Lorentz and Gauss components (as a function of , the ratio of the Lorentz and Gauss width). In several studies pseudo-Voigt approximations have been used for analysis of experimental data, where the weight has been estimated by least squares fitting [e.g. 17, 33].
Our conclusions now are therefore similar to those given in Schreier [25, 26]: Closed-form expressions as presented here might be desirable for certain applications, but their quality is limited. In general approximations based on modern state-of-the-art numerical methods, e.g. rational approximations as discussed in Humlíček [34, 31], Weideman [32] and Schreier [24, 35] are recommended.
Acknowledgments
Financial support by the Deutsche Forschungsgemeinschaft — DFG (project SCHR 1125/3-1) is gratefully acknowledged.
Appendix A Translations
The Lorenz, Gauss, and Voigt profiles are defined as
[TABLE]
with normalization and half width at half maximum (HWHM) . The dimensionless variables of the Voigt function are defined as ratios
[TABLE]
In the definition of the pseudo-Voigt functions the following ratios of the widths are used frequently
[TABLE]
Appendix B Numerical Constants
The constant used in the Kielkopf [16] half width approximation is and the coefficients of the correction term are
[TABLE]
The coefficients of the half width expansion (19) of Thompson et al. [18] are
[TABLE]
and the weight expansion (20) is defined with
[TABLE]
The coefficients of the Lorentz and Gauss weights used by Liu et al. [21] are
[TABLE]
Appendix C Matveev
As indicated in the footnote of subsection 2.3, some differences show up in the original work by Matveev [14] and in Titov and Haus [22]. Whereas the factor in the correction for the width is required for dimension reasons, our tests depicted in Fig. 4 indicate that the weight factor (or in the original work) has been forgotten by Titov and Haus [22].
Appendix D Computational efficiency
For a first, preliminary test of the speed of pseudo-Voigt approximations we have used the IPython [30] builtin “magic” function %timeit:
In [1]: from pseudoVoigt import *
In [2]: x=numpy.linspace(0.,100.,10001); y=1.0
In [3]: %timeit kielkopf(x,y)
424 s 273 ns per loop (mean std. dev. of 7 runs, 1000 loops each)
For the three cases , , and (see Table 1) the Humlíček–Weideman combination suggested in Schreier [24] is somewhat faster than the Kielkopf and Matveev approximations. However, evaluation of one or two exponential(s) (Gaussians) and two fractions for a single by the Kielkopf and Matveev codes appears to be faster than the numerous multiplications required for the “brute-force” Weideman [32] 24-term rational approximation or the Humlíček [34] rational approximation “zpf16” generalized to 16 terms [35].
For a more realistic assessment, molecular cross sections are computed as required for high resolution atmospheric radiative transfer modeling, i.e. HNO3 cross sections in the interval resulting from the superposition of 2376 lines in are computed for a series of pressure and temperature pairs corresponding to altitudes in Earth’s atmosphere (see Schreier [24, 35] for more details). In Python the total time required with the Kielkopf and Matveev approximations is more than a factor two larger than with the Humlíček–Weideman combination.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1Armstrong [1967] B.H. Armstrong. Spectrum line profiles: The Voigt function. J. Quant. Spectrosc. & Radiat. Transfer , 7:61–88, 1967. doi: 10.1016/0022-4073(67)90057-X .
- 2Olver et al. [2010] F.W.J. Olver, D.W. Lozier, R.F. Boisvert, and C.W. Clark, editors. NIST Handbook of Mathematical Functions . Cambridge University Press, New York, NY, 2010. Print companion to [ 3 ] .
- 3[3] DLMF. NIST Digital Library of Mathematical Functions . National Institute of Standards and Technology. URL http://dlmf.nist.gov/ . Online companion to [ 2 ] .
- 4Oldham et al. [2009] Keith B. Oldham, Jan Myland, and Jerome Spanier. An Atlas of Functions . Springer, 2009. doi: 10.1007/978-0-387-48807-3 .
- 5Flores-Llamas et al. [1991] H. Flores-Llamas, A. Cabrol-Prieto, H. Jiménez-Domínguez, and M. Torres-Valderrama. An expression for an approximation of the Voigt profile I. Nucl. Instr. and Meth. , A 300:159–163, 1991. doi: 10.1016/0168-9002(91)90719-7 .
- 6Melcher and Gerth [1977] H. Melcher and E. Gerth. Darstellung von Linienprofilen durch Lorentz-Funktionen n 𝑛 n -ten Grades. Experimentelle Technik der Physik , 25:527–538, 1977.
- 7Mc Lean et al. [1994] A.B. Mc Lean, C.E.J. Mitchell, and D.M. Swanston. Implementation of an efficient analytical approximation to the Voigt function for photoemission lineshape analysis. J. Electron Spectros. & Related Phenom. , 69(2):125–132, 1994. doi: 10.1016/0368-2048(94)02189-7 .
- 8Martin and Puerta [1981 a] P. Martin and J. Puerta. Generalized Lorentzian approximations for the Voigt line shape. Appl. Opt. , 20:259–263, 1981 a. doi: 10.1364/AO.20.000259 .
