###### Abstract

For accurate line-by-line modeling of molecular cross sections several
physical processes “beyond Voigt” have to be considered. For the speed-
dependent Voigt and Rautian profiles (SDV, SDR) and the Hartmann-Tran profile
the difference $w(\mathrm{i}z_{-})-w(\mathrm{i}z_{+})$ of two complex error
functions (essentially Voigt functions) has to be evaluated where the function
arguments $z_{\pm}$ are given by the sum and difference of two square roots.
These two terms describing $z_{\pm}$ can be huge and the default
implementation of the difference can lead to large cancellation errors. First
we demonstrate that these problems can be avoided by a simple reformulation of
$z_{-}$. Furthermore we show that a single rational approximation of the
complex error function valid in the whole complex plane (e.g. by Humlíček,
1979 or Weideman, 1994) enables computation of the SDV and SDR with four
significant digits or better. Our benchmarks indicate that the SDV and SDR
functions are about a factor 2.2 slower compared to the Voigt function, but
for evaluation of molecular cross sections this time lag does not
significantly prolong the overall program execution because speed-dependent
parameters are available only for a fraction of strong lines.

###### keywords:

Complex error function; Voigt profile; Hartmann-Tran profile; Rational
approximations

††journal: JQSRT, received 27 August 2020, accepted 10 October 2020; doi:
10.1016/j.jqsrt.2020.107385††footnotetext: This manuscript version is made
available under the CC-BY-NC-ND 4.0 http://creativecommons.org/licences/by-nc-
nd/4.0/

##  1 Introduction

The Voigt profile [1] accounting for collision (pressure) and Doppler
(thermal) broadening has been the standard for high-resolution line-by-line
modeling of infrared (IR) and microwave molecular absorption. Inadequacies of
this profile have been observed since decades in molecular laboratory
spectroscopy [e.g. 2], and more recently discrepancies between theory and
measurements have also become significant in atmospheric spectroscopy.

Collision induced changes of molecular velocity reduce the Doppler broadening,
and several profiles have been suggested to describe this collisional (or
Dicke) narrowing, e.g. the Rautian profile [3]. Moreover, the speed-dependence
of the relaxation rates modifies the Lorentz line shape modeling the collision
broadening [4, 5] and can be described by the Speed-Dependent Voigt (SDV)
profile. Assuming that these processes are independent leads to the Speed-
Dependent Rautian (SDR) profile. The partial correlation of these effects is
considered by the partially Correlated quadratic-Speed-Dependent Hard-
Collision profile (pCqSDHCP), originally developed by Tran, Ngo, and Hartmann
[6] (therefore called Hartmann-Tran or HT profile for short) and recommended
for high resolution spectroscopy in a recent IUPAC Technical Report [5].

Using these more sophisticated profiles has been shown to improve the analysis
of ground-based Fourier transform IR spectra and space-borne limb occultation
measurements of the Atmospheric Chemistry Experiment — Fourier Transform
Spectrometer (ACE-FTS) [e.g. 7, 8, 9]. The stringent accuracy and precision
requirements of current space-borne carbon dioxide and methane observations
(e.g. the Greenhouse Gases Observing Satellite [GOSAT, 10], the Orbiting
Carbon Observatory [OCO-2, 11] and the Sentinel-5p TROPOspheric Monitoring
Instrument [TROPOMI, 12]) have also highlighted the need for improved
molecular spectroscopy in the short-wave IR [e.g. 13, 14, 15, 16, 17, 18, 19].
Improved Atmospheric Spectroscopy databases (IAS) have been the objective of a
study funded by ESA in the context of the Scientific Exploitation of
Operational Missions (SEOM) initiative: SEOM-IAS provides data for
$\mathrm{CO}$, $\mathrm{CH_{4}}$ and $\mathrm{H_{2}O}$ in the TROPOMI
$2.3\rm\,\mu m$ region [20]. Moreover, the HITRAN database has started to
include “beyond-Voigt” parameters for selected molecules [21].

Computational aspects of the SDV profile have been discussed in a previous
paper [22] (henceforth “CASDV”). Here we extend this discussion to the SDR
profile. After a brief survey of available line data we recall some
definitions and relations in the following section. We continue with a
discussion of some subtleties of the SDV function and then present comparisons
of SDR evaluations against a reference code in section 3. Moreover, we provide
an extensive assessment of the computational efficiency of the SDV and SDR
(floating-point operation counts and time benchmarks). A summary is given in
the final section 4. For simplicity, pressure-induced line shift, self-
broadening, and line mixing will be ignored. Python modules of the SDV and SDR
functions along with rational approximations for the complex error function
are provided in supplemental files.

##  2 Line data and models

###  2.1 Line data

For an assessment of the performance of various line model algorithms and
implementations it is useful to recap the range of the function arguments to
be expected. In Schreier [23, 24] we concluded that the ratio of the Lorentz
and Gauss width (the $y$ parameter, see next subsection) can be as small as
$10^{-8}$ for atmospheric IR spectroscopy. Even smaller values are possible
for large wavenumbers (visible or UV), light molecules (e.g. $\mathrm{H_{2}}$)
and warm to hot atmospheres.

Considering the new parameters required by the speed-dependent profiles, a
survey of the SEOM-IAS data indicates that the ratio of the collision
broadening parameters has a mean value of $\gamma_{2}/\gamma_{0}\approx 0.1$,
see Fig. 1. Furthermore, the bottom-right plot of Fig. 1 shows that the
frequency of velocity-changing collisions (Dicke narrowing) is about one tenth
of the air-broadening parameter, i.e. $\nu_{\text{vc}}\approx
0.01\rm\,cm^{-1}\approx 0.1\gamma_{0}$. Note that in SEOM-IAS the partial
correlation between speed-dependence and velocity changes is not considered,
i.e. the HT parameter $\eta$ is assumed to be zero and the SDR is sufficient
for this database. Furthermore, the line shift’s speed dependence parameter
$\delta_{2}$ is zero for all carbon monoxide and water lines, whereas 12 of
the 11905 methane lines have nonzero values with $-0.006545\leq\delta_{2}\leq
0.00316\rm\,cm^{-1}$.

Figure 1: Survey of SEOM-IAS line data. Top and bottom left: ratio of the
collision broadening parameters, $\gamma_{2}/\gamma_{0}$ (the title indicates
the number of lines with nonzero $\gamma_{2}$ and the mean value of the
ratio). Bottom right: Dicke narrowing parameter $\nu_{\text{vc}}$.

In the latest version of the HITRAN database, “beyond-Voigt” parameters are
available for seven (of 49) molecules according to Table 3 of Gordon et al.
[21]. However, these are not necessarily HT or SDV parameters and might
describe, for example, line mixing. For $\mathrm{H_{2}O}$ there are 2016 (of
about 52 000) lines with nonzero $\gamma_{2}$ in the spectral range
$1852\mbox{\,--\,}3995\rm\,cm^{-1}$ and a minimum line strength $S=6.9\cdot
10^{-25}\rm\,cm^{-1}/(molec.cm^{-2})$, see Fig. 2 (left) and Loos et al. [25,
26]; moreover the Dicke narrowing parameter is nonzero for 237 transitions
with a mean of $0.0157\rm\,cm^{-1}$. For $\mathrm{N_{2}O}$ 80 lines around
$2200\rm\,cm^{-1}$ with $S\geq 10^{-19}\rm\,cm^{-1}/(molec.cm^{-2})$ are
listed (Fig. 2). For both molecules the speed dependence of the line width is
about one tenth of the speed-averaged width, and the correlation parameter
$\eta$ is zero for all transitions. (For $\mathrm{H_{2}}$ see also [27].)

Similar to HITRAN and GEISA, the SEOM-IAS line parameters are given for a
reference pressure $p_{\text{ref}}=1\rm\,atm$ and temperature
$T_{\text{ref}}=296\rm\,K$. Both broadening parameters are assumed to have the
same pressure and temperature dependence, i.e. $\gamma_{0,2}\sim pT^{-n}$ with
the temperature exponent $n$ ($1/2$ according to classical theory), whereas
the narrowing parameter is inversely proportional to temperature,
$\nu_{\text{vc}}\sim p/T$ [see also 28, 29]. In Earth’s (or a planetary)
atmosphere these three parameters are varying over orders of magnitude, but
the ratios $\gamma_{2}/\gamma_{0}$ and $\nu_{\text{vc}}/\gamma_{0}$ are
approximately constant over pressure (or altitude).

Figure 2: HITRAN $\mathrm{H_{2}O}$ (left) and $\mathrm{N_{2}O}$ (right) lines
with HT widths defined: Top left: collision broadening parameters (x and +
markers, left axis) and their ratio $\gamma_{2}/\gamma_{0}$ (red filled
circles, right axis). Bottom left: the Voigt parameter $y$ for ToA @ 120 km.

###  2.2 Line models

Following Varghese and Hanson [3] we distinguish between the Voigt profile $g$
and its generalizations and the Voigt function $K$ and its generalizations

$g(\nu;\hat{\nu},\gamma_{\text{L}},\gamma_{\text{G}},\dots)~{}=~{}{\sqrt{\ln
2/\pi}\over\gamma_{\text{G}}}\,K(x,y,\dots)~{}.$ (1)

The profiles $g$ are defined in terms of the physical variables wavenumber
$\nu$, center position $\hat{\nu}$, and broadening parameters, all in units of
reciprocal wavenumbers $[\rm cm^{-1}]$ (in the following all $\gamma$ as well
as $\nu_{\text{vc}}$ are considered for the actual pressure and temperature).
Division by the Gaussian (Doppler) half width allows to introduce
dimensionless variables that reduces the number of arguments by one and is
more convenient from a mathematical point:

$\displaystyle x$ $\displaystyle\equiv\sqrt{\ln
2}(\nu-\hat{\nu})/\gamma_{\text{G}}$ $\displaystyle\qquad y$
$\displaystyle\equiv\sqrt{\ln 2}\gamma_{\text{L}}/\gamma_{\text{G}}$ (2a)
$\displaystyle q$ $\displaystyle\equiv\sqrt{\ln
2}\gamma_{\text{2}}/\gamma_{\text{G}}$ $\displaystyle\qquad\zeta$
$\displaystyle\equiv\sqrt{\ln 2}\nu_{\text{vc}}/\gamma_{\text{G}}~{}.$ (2b)

From a computational point, these profiles and corresponding functions can be
calculated readily from the complex error function [30, 31, 32]

$\displaystyle w(z)~{}$
$\displaystyle=~{}{\mathrm{i}\over\pi}~{}\int_{-\infty}^{\infty}{\mathrm{e}^{-t^{2}}\over
z-t}\,\mathrm{d}t$ (3)
$\displaystyle=~{}K(x,y)+\mathrm{i}L(x,y)\qquad\text{with $z=x+\mathrm{i}y$.}$
(4)

The real part is the “standard” Voigt function, essentially the convolution of
a Lorentzian and Gaussian function,

$K(x,y)~{}=~{}{y\over\pi}~{}\int_{-\infty}^{\infty}{\mathrm{e}^{-t^{2}}\over(x-t)^{2}+y^{2}}\,\mathrm{d}t~{},$
(5)

where $x$ and $y$ are the standard Voigt function parameters (2a)
characterizing the distance to the line center at wavenumber $\hat{\nu}$ and
the ratio of the Lorentzian and Gauss widths.

The SDR function is essentially the quotient of the difference of two complex
error functions

$K_{\text{sdr}}(x,y,q,\zeta)~{}=~{}\mathop{\rm
Re}\left({w(\mathrm{i}z_{-})-w(\mathrm{i}z_{+})\over
1-\sqrt{\pi}\zeta\Bigl{(}w(\mathrm{i}z_{-})-w(\mathrm{i}z_{+})\Bigr{)}}\right)$
(6)

where the extra parameters $q$ and $\zeta$ are the broadening’s quadratic
speed dependence $\gamma_{2}$ and the frequency of velocity-changing
collisions $\nu_{\text{vc}}$ normalized by the Gaussian widths, respectively,
Eq. (2b). The arguments of the complex error function are defined by 111The
upper case $X$ and $Y$ correspond to the HT notation [5, 6] with
$X\equiv\bigl{[}(\mathrm{i}(\hat{\nu}-\nu)+\gamma_{\text{L}}+\nu_{\text{vc}}\bigr{]}/\gamma_{2}-{3\over
2}$ and $Y\equiv\left({\gamma_{\text{G}}\big{/}2\sqrt{\ln
2}\gamma_{2}}\right)^{2}$. Note that $Y$ is real, a non-vanishing line shift
speed-dependence parameter would lead to a complex $Y$. Boone et al. [33]
define two variables $\alpha$ and $\beta$ corresponding to the real and
imaginary part of $X$ (with $\nu_{\text{vc}}=0$), a third variable $\delta$ is
identical to $Y$. The function $\mathop{\rm Re}(A)$ defined in Eq. (7) of
Tennyson et al. [5] is identical to the “SDV function” $K_{\text{sdv}}$ except
for a factor $\sqrt{\pi\ln 2}/\gamma_{\text{G}}$. Note that in footnote 1 of
[22] we have incorrectly stated that an Im operator is missing in Eq. (11) of
Tran et al. [6].

$\displaystyle z_{\pm}~{}$ $\displaystyle=~{}\sqrt{{y+\zeta-\mathrm{i}x\over
q}-{3\over 2}+{1\over 4q^{2}}}~{}\pm~{}{1\over 2q}$ (7)
$\displaystyle=~{}\sqrt{X+Y}~{}\pm~{}\sqrt{Y}~{}.$ (8)

For vanishing $\nu_{\text{vc}}\propto\zeta=0$ the SDR function reduces to the
SDV function

$K_{\text{sdv}}(x,y,q)~{}=~{}\mathop{\rm
Re}\bigl{(}w(\mathrm{i}z_{-})-w(\mathrm{i}z_{+})\bigr{)},$ (9)

whereas for zero speed dependence $\gamma_{2}\propto q=0$ the Rautian function
is obtained,

$K_{\text{r}}(x,y,\zeta)~{}=~{}\mathop{\rm Re}\left({w(z)\over
1-\sqrt{\pi}\zeta w(z)}\right)~{}.$ (10)

A vast number of algorithms have been developed for the complex error function
exploiting a wide variety of numerical techniques. In recent papers we have
discussed rational approximations by Humlíček [34, 35] and Weideman [36] and
recommended combinations of the asymptotic approximation given in the Humlíček
[35] w4 code (the quotient of a first and second degree polynomial) with the
more accurate approximations of [34] or [36] for small arguments [23, 24].

##  3 Results

###  3.1 Computation of the complex square roots

The arguments $\mathrm{i}z_{\pm}$, Eq. (7), of the complex error functions for
(6) and (9) require the computation of a complex square root. In
essence222This is essentially the square root used by Boone et al. [33]
without the $\delta$ term.,

$\displaystyle r~{}$ $\displaystyle=~{}\sqrt{\alpha+\mathrm{i}\beta}$ (11a)
$\displaystyle=~{}{1\over\sqrt{2}}\sqrt{\sqrt{\alpha^{2}+\beta^{2}}+\alpha}~{}+~{}\mathop{\rm
sign}(\beta){\mathrm{i}\over\sqrt{2}}\sqrt{\sqrt{\alpha^{2}+\beta^{2}}-\alpha}$
(11b)
$\displaystyle=~{}{1\over\sqrt{2}}\sqrt{\sqrt{\alpha^{2}+\beta^{2}}+\alpha}~{}+~{}{\mathrm{i}\beta/\sqrt{2}\over\sqrt{\sqrt{\alpha^{2}+\beta^{2}}+\alpha}}$
(11c)

The three variants of (11) are all equivalent mathematically, but might be
different numerically.

Tran, Ngo, and Hartmann [6] (henceforth “TNH”) evaluate the square root of the
complex argument using Fortran’s intrinsic function CDSQRT, essentially the
right hand side of Eq. (11a), whereas the Boone, Walker, and Bernath [33]
(henceforth “BWB”) Fortran implementation is based on Eq. (11b). In CASDV we
have indicated that the alternative form (11c) might be advantageous
computationally because possible inaccuracies of the difference evaluation can
be avoided.

With respect to efficiency, it requires only two instead of three square root
evaluations (but an extra division) and there is no need to evaluate the sign
function. Note that the Voigt and generalized Voigt functions are symmetric
w.r.t. $x\propto\beta\equiv\mathrm{Im}(X)$, i.e. they depend on $|\beta|$ only
and the sign function can be avoided.

Figure 3: Contour plot of relative differences of the SDV function for
$\gamma_{\text{L}}/\gamma_{2}=10$: mutual differences of the three versions
shown in Eq. (11). Bottom right: the SDV functions for $y=5\cdot 10^{-8}$; the
curves are plotted twice with the entire $K$ range (left axis) and with the
$K$ range limited to small values (right axis).

The contour plots of Fig. 3 demonstrate that the three forms are equivalent
except for very small $y$, i.e. the relative differences $|\Delta K|/K$ are
small. However, discrepancies can be observed for $y<10^{-6}$. Inspection of
the SDV for $y=5\cdot 10^{-8}$ (Fig. 3 bottom right) indicates that (11b)
produces discrete steps near the line center (small $x$), where the other two
forms are indistinguishable. In the wings (larger $x$) the three forms show a
zigzag behaviour; (11b) and (11c) are quite similar and somewhat smaller than
(11a) that oscillates around the Voigt function. Fortunately the function
values here are many orders of magnitude smaller compared to the center value
and the apparent errors are likely to have no impact on molecular cross
sections resulting from the superposition of numerous lines. Note that TNH
carefully discuss limiting asymptotic cases and have implemented dedicated
algorithms for small and large $|X|/Y$ in the supplemental Fortran source
code.

###  3.2 Problems with tiny values of $y$ and $q$.

Although the direct evaluation of the complex square (11a) appears to be
better, the zigzag indicates further problems. A closer analysis indicates
that these problems are related to the evaluation of $z_{-}$, i.e. the
difference of the complex square root $\sqrt{X+Y}$ and $\sqrt{Y}$. For tiny
$y$ (and $q<y$) the real valued $Y=1/4q^{2}$ becomes extremely big, much
bigger than the complex valued $X$, and the standard floating point precision
with about 16 significant digits fails to evaluate this difference. To test
this hypothesis, the SDV has been implemented using the Python library mpmath
[37] allowing real and complex floating-point arithmetic with arbitrary
precision. With 32 significant figures (roughly quadruple precision) the
square roots, their difference and the complex error function (computed by
$w(z)=\exp(-z^{2})\mathop{\rm erfc}(-\mathrm{i}z)$) can be evaluated reliably
even for these extreme cases.

Figure 4: The SDV function evaluated for tiny values of $y$. Top left: the
real part of the complex error function argument $z_{-}$ for $y=1\cdot
10^{-8}$ and $q=1\cdot 10^{-9}$. Center left: the corresponding SDV function
values. Bottom left: the relative error w.r.t. the “mpm” quadruple precision
evaluation. Right: the SDV functions for $y=2\cdot 10^{-8}$ and two values of
$q$.

Fig. 4 (left) shows results for $y=10^{-8}$ and $q=0.1y$ (some specific
numbers for $x=10$ and $x=12$ are listed in the appendix): Whereas
$\alpha={y\over q}-{3\over 2}$ is a small number, $Y\equiv\delta={1/4q^{2}}$
is huge, and with the default double precision accuracy of Python (or C or
Fortran) the real part of the first square root in (11) is essentially
independent of $\alpha$. For the $x$ values considered here ($0\leq x\leq 25$)
the imaginary part of $X+Y$, i.e. ${x/q}$ is a moderately large number.
However, the real part of the complex square root $\sqrt{X+Y}$ is identical in
double precision for $x=10$ and $x=12$ (but clearly distinct with enhanced
precision). Moreover, because $|X|\ll Y$, the difference of two huge,
approximately similar numbers cannot be evaluated correctly, resulting in a
stepwise behaviour of $\mathrm{Re}\left(\sqrt{X+Y}-\sqrt{Y}\right)$ (Fig. 4
top-left). As a consequence, the evaluation of $w(\mathrm{i}z_{-})$ is
unreliable, too; in particular, the difference of the complex error functions
$w(\mathrm{i}z_{-})-w(\mathrm{i}z_{+})$ can become negative, indicated by the
missing values in Fig. 4 (center-left).

Similar to the reformulation discussed above (Eqs. (11b) and (11c)) the
difference of the two roots (8) can also be computed in a reliable way to
avoid the subtraction of two similar numbers [38]333See also
https://herbie.uwplse.org/,

$z_{-}~{}\equiv~{}\sqrt{X+Y}-\sqrt{Y}~{}=~{}{X\over\sqrt{X+Y}+\sqrt{Y}}~{}=~{}{X\over
z_{+}}~{}.$ (12)

Fig. 4 shows that this safe variant avoids the steps in $\mathop{\rm
Re}(z_{-})$ and gives SDV values close to the quadruple precision values;
whereas the relative error of the original version is in the percentage range,
the cancellation-safe implementation has a maximum relative error of about
$10^{-5}$ (bottom-left). The superiority of this approach is also confirmed by
the two examples shown on the right of Fig. 4, where the original “naive”
computation delivers oscillations with frequent negative SDV values.

###  3.3 The SDV function again

Both TNH and BWB have emphasized that the computation of the SDV and HT
profiles needs to be done carefully when different complex error function
approximations are used for the two arguments $\mathrm{i}z_{\pm}$. In
particular, the TNH code implements the Humlíček [34] cpf12 subroutine (with
about $10^{-6}$ maximum relative error) that utilizes two different
approximations for large and small arguments (in fact augmented with a 15-term
asymptotic expansion of $w(z)$ for $|z|>8$). When the two arguments are close
to each other, TNH ensure that they are evaluated with the same method. BWB
exploit the Humlíček [35] w4 code ($10^{-4}$ relative accuracy) with four
different approximations: their code uses the higher degree rational
approximation for both arguments. However, as discussed in CASDV, this
approach is dangerous because the higher degree approximation is not
necessarily valid in the region of large function arguments.

Obviously, these problems could be avoided if a complex error function
algorithm is used that is valid for the entire $x,y$ range. Weideman [36] has
developed rational approximations that can be used in the entire complex
plane. As demonstrated in [23], the $n=24$ approximation has a maximum
relative error less than $10^{-4}$ for $y>10^{-4}$ only; with $n=32$ terms the
code is better than $9\cdot 10^{-5}$ for all $0\leq x\leq 20$ and $10^{-6}\leq
y\leq 10^{2}$ for both the real and imaginary part of $w$. The region I
approximation of the Humlíček [34] cpf12 code cannot be used for $y<10^{-2}$,
but a generalization of this 12-term rational approximation applicable to all
$(x,y)$ considerably improves the performance [24]: the 16-term approximation
(cpf16) achieves an accuracy of about $10^{-4}$ for $y>10^{-8}$, and with 20
terms (cpf20) the error can be further reduced by more than a factor ten.

Figure 5: Contour plot of relative differences of the SDV function computed
with the Humlíček (top) and Weideman complex error function codes for
$\gamma_{\text{L}}/\gamma_{2}=10$. The number in the title indicates the
maximum relative error.

Fig. 5 depicts the relative errors of the SDV computed with these “global”
complex error function algorithms (the 16- and 20-term Humlíček [34] and the
24- and 32-term Weideman [36] approximations) for
$\gamma_{\text{L}}/\gamma_{2}=y/q=10$. As in our previous works we use the
wofz complex error function provided by SciPy (module scipy.special) with a
stated accuracy of 13 significant digits as a reference code [see also 39,
40]. All implementations work reasonably good for $y>10^{-4}$, but for smaller
$y$ problems become apparent especially for the Weideman $n=24$ approximation.
The Weideman $n=32$ and the Humlíček 16-term approximation can be used safely
for $y>10^{-6}$, but only cpf20 is able to evaluate the SDV with errors less
than $5\cdot 10^{-5}$ for $0\leq x\leq 25$ and $10^{-8}\leq y\leq 10^{2}$.
Note that the error patterns for the SDV deviations are similar to the pattern
of the complex error function deviations (cf. Fig. 7 in [23] and Fig. 2 and 4
in [24]).

###  3.4 Beyond-Voigt vs. Voigt

Figure 6: Relative differences of the SDR, SDV, and Rautian relative to the
Voigt function as a function of $y$ with $y/q=y/r=0.1$.

Before analyzing the performance of various complex error function algorithms
for the evaluation of the SDR it is instructive to see the relative change of
the function due to the inclusion of velocity-changing collisions. Figure 6
shows that the relative change
$|K_{\text{sdr}}-K_{\text{vgt}}|/K_{\text{vgt}}$ can be as large as some
percent. Differences between SDR and Voigt up to about 4% can be observed in
the line center region for $y\approx 1$, whereas for large $x\gg x_{1/2}$ the
relative difference is less than $10^{-4}$, i.e. the advanced profiles
essentially resemble the Voigt profile asymptotically. Here the Voigt function
half width is given by the Whiting [41] approximation
$x_{1/2}=\tfrac{1}{2}\left(y+\sqrt{y^{2}+4\ln 2}\right)$.

###  3.5 The SDR function

The relative error of the SDR function computed with the Humlíček [34] or
Weideman [36] code is shown in Fig. 7. Interestingly the patterns are quite
similar to those of Fig. 5. In particular, for the Weideman $n=24$ rational
approximation the errors can become significant already for moderately small
$y$ (low pressure), whereas for 32 terms the approximation shows problems only
for tiny $y$. Both versions of the Humlíček complex error function code give
reliable results with four and five significant digits for the 16 and 20 term
approximation, respectively.

Figure 7: Contour plot of relative differences of the SDR function computed
with the Humlíček (top) and Weideman complex error function codes compared to
the wofz reference code.

###  3.6 Performance

For an assessment of the computational efficiency of various implementations
we have used IPython’s builtin “magic function” %timeit similar to the tests
described in Schreier [24]. First we evaluate the SDV for the “matrix” of 251
$x$ grid points and 101 $y$ grid points used for all contour plots shown so
far (see B). Tab. 1 shows that the times required for the three different
versions of the complex square root (11) and the “cancellation–safe”
alternative (12) are approximately identical. Both division and square root
are classified as “special function” by Goedecker and Hoisie [42] from a
computational point of view, hence the costs of the (11b) and (11c) versions
should be roughly identical.

Table 1: Execution time for various SDV implementations. (All tests have been performed on a single Intel Core i5-9600 with 3.1 GHz.) function | time
---|---
cpf16 | 1.46 ms
sdv_real_bwb (11b) | 4.37 ms
sdv_real_casdv (11c) | 4.47 ms
sdv_naive (11a) | 4.91 ms
sdv_safe (12) | 4.94 ms

Obviously these advanced line shapes are computationally more expensive. For
the following counts of floating-point operations only those required for
every $x$ value (corresponding to a wavenumber grid point $\nu$) are
considered, i.e. operations executed only once per line (e.g. division by
$\gamma_{\text{G}}$) are ignored. For both SDV and SDR two complex error
functions have to be evaluated and in addition a complex square root ($z_{+}$
according to (7)) and a division ($z_{-}$ according to (12)) is required, a
second division for the SDR (6), whereas for the Rautian function (10) there
is a single extra division. Tran et al. [6] have discussed the speed of the HT
profile and concluded that “the maximum ratio of the computer time needed for
this calculation to that for the corresponding Voigt profile can thus reach
$2\times 2.5=5$.” Note that for the HT function no further “special function”
evaluations are required compared to the SDR.

For a first idea of the computational speed of the various line shapes we
count the number of divisions and square roots, i.e. “special function”
evaluations in the sense of Goedecker and Hoisie [42]. Assuming a single
rational approximation for the complex error function (Humlíček’s cpf16 in the
following) valid on the whole complex plane one division is required for the
Voigt function. Table 2 (second column) indicates that for the SDV and SDR
functions a factor of four to five penalty compared to the Voigt function can
be expected.

For the timings reported in Tab. 2 (last column) a somewhat more realistic
scenario is considered: For line-by-line (lbl) molecular cross sections the
contribution of a single spectral transition is usually computed in a finite
interval with a fixed wavenumber cutoff (for example up to distances of
$25\rm\,cm^{-1}$ from the line center) or a cut at a multiple of the line half
width. Here a uniform $x$-grid from $0$ to $100x_{1/2}$ and a grid point
spacing defined by a fifth of the half width is used. The results demonstrate
that the Rautian function is only slightly slower than the Voigt function, and
the SDV and SDR are roughly a factor two slower, in contrast to the estimate
based on “special function” counts.

These results suggest that the additions and multiplications should also be
considered. In fact, with the Horner scheme 23 add-multiply operations are
required to compute a Voigt function value with the Humlíček [34] rational
approximation generalized to 16 terms [24]; for the SDV and SDR the number of
extra multiplications (in addition to the 46 multiplications for the two cpf16
calls) is small (Tab. 2, third column).

Table 2: Execution time for Voigt, Rautian, SDV, and SDR functions. The second and third columns give the number of “special functions” and multiplications required. The cpf16 rational approximation of the complex error function is used for all functions. function | sp. fct. | mult. | time
---|---|---|---
Voigt | 1 | 23 | 9.04 ms
Rautian | 2 | 24 | 9.49 ms
SDV | 4 | 49 | 19.4 ms
SDR | 5 | 50 | 19.8 ms

Finally we compute cross sections

$k(\nu,p,T)~{}=~{}\sum\limits_{l}S_{l}(T)\>g\Bigl{(}\nu-\hat{\nu}_{l},\gamma_{l}^{\text{(L)}}(p,T),\gamma_{l}^{\text{(G)}}(T),\dots\Bigr{)}$
(13)

in the SWIR with line data (position $\hat{\nu}_{l}$, strength $S_{l}$ and
broadening parameters) taken from the SEOM-IAS database. The SWIR channels of
TROPOMI [12] are exploited for remote sensing of atmospheric carbon monoxide
($\mathrm{CO}$) and methane ($\mathrm{CH_{4}}$). For the retrieval of
$\mathrm{CO}$ vertical column densities with the Beer InfraRed Retrieval
Algorithm (BIRRA) a spectral interval $4277\,\text{--}\,4303\rm\,cm^{-1}$ is
used [43, 18], and in the following we report execution times for cross
sections evaluated for a 20 level mid latitude summer atmosphere (with top of
atmosphere at 100 km, [44]). For consistency with the continuum corrections
and to allow a convolution of the monochromatic spectrum with the instrumental
line shape function an extended spectral interval is considered. The cross
sections are computed using the lbl2xs function of the Py4CAtS package [PYthon
for Computational ATmospheric Spectroscopy, 45].

The results listed in Tab. 3 confirm that the Rautian line shape is slightly
more expensive w.r.t. computational speed. SDV and SDR times are approximately
identical and larger than the Voigt times. The modest time lag incurred by the
speed-dependent profiles appears to be reasonable because only a small
fraction of the lines has $\gamma_{2}$ and/or $\nu_{\text{vc}}$ defined, i.e.
the standard Voigt profile can be used for the majority of weak lines.

The high quality of the Humlíček [34] 16-term rational approximation is not
required in the line wings, and further tests have therefore been conducted
with a combination of this cpf16 code and the Humlíček [35] asymptotic
rational approximation for large complex error function arguments $|z|>15$
(termed hum1zpf16 in [24]). This combined code provides a significant speed-up
for all line shapes, with the relative performance (Voigt vs. speed-dependent
profiles) being similar to the previous tests (Tab. 3 third block).

Table 3: Execution time (seconds per line) for lbl molecular cross sections in the SWIR. In the first block the total number of lines in $4250\,\text{--}\,4330\rm\,cm^{-1}$ and the number of lines with “beyond Voigt” parameters is given. For methane 62 lines have both non-zero speed-dependence and Dicke narrowing parameter. In the second block times for the cpf16 complex error function code are listed, in the third block times for the hum1cpf16 code. function | $\mathrm{CO}$ | $\mathrm{CH_{4}}$ | $\mathrm{H_{2}O}$ | total
---|---|---|---|---
lines | 117 | 6516 | 1262 | 7795
$\gamma_{2}>0$ | 10 | 637 | 39 |
$\nu_{\text{vc}}>0$ | 10 | 66 | 113 |
Voigt | 0.0521 | 0.0411 | 0.0417 | 0.0413
Rautian | 0.0545 | 0.0436 | 0.0442 | 0.0438
SDV | 0.0580 | 0.0466 | 0.0437 | 0.0463
SDR | 0.0599 | 0.0462 | 0.0457 | 0.0463
Voigt | 0.0092 | 0.0068 | 0.0069 | 0.0069
Rautian | 0.0121 | 0.0090 | 0.0090 | 0.0090
SDV | 0.0126 | 0.0097 | 0.0076 | 0.0094
SDR | 0.0157 | 0.0122 | 0.0100 | 0.0119

##  4 Summary

Several line shapes have been recommended as a generalization of the standard
Voigt function to model subtle broadening effects. Various computational
aspects of the SDV considering the speed-dependence of the line broadening had
been discussed in a recent paper [22] and here we continue this study
including the more advanced SDR that also models collisional narrowing
effects. First we present a brief survey of data available in the widely used
HITRAN database [21] and in the new SEOM-IAS database [20] including a
discussion of the parameter range to be expected. Next we demonstrate that for
argument values possible in the upper atmosphere the SDV and SDR function
values might suffer from cancellation errors; these numerical problems can be
avoided by a simple reformulation, thus eliminating the need for case
selections and Taylor expansions etc. Furthermore, the impact of various
complex error function algorithms is studied: the Humlíček rational
approximation generalized to 16 terms or the Weideman 32-term approximation
deliver SDV and SDR values with four or more significant digits. (Note that in
databases such as HITRAN, GEISA, or SEOM-IAS the line parameters are listed
with a few digits accuracy only.) Finally an assessment of the execution speed
is provided. First we discuss the number of floating point operations required
for the various line shape functions: because of the extra divisions and
square roots both SDV and SDR are computationally more expensive compared to
the Voigt function. However, for “real world” applications (molecular cross
sections) the impact on the total code execution time is expected to be small.

## Acknowledgments

This study has been motivated by a remark made by Frank Hase during a
“Workshop on SWIR Spectroscopy for S5p” at the Karlsruhe Institute of
Technology (KIT) end of January 2020 (Thanks to Claus Zehner for the
invitation). FS is supported by the DFG project SCHR 1125/3-1; PH is supported
by the DAAD (German Academic Exchange Service). Thanks to Thomas Trautmann for
critical reading of the manuscript. Thanks also to Alexandre Guillaume (JPL)
for an interesting email discussion.

Table 4:  Numerical values for $y=10^{-8}$ and $q=10^{-9}$, hence $\alpha=8.5$ and $\delta\equiv Y=2.5\cdot 10^{17}$. The first and fourth row correspond to the “naive” version, the second and fifth row to the “safe” version” and the reference values in the third and sixth row are obtained by mpmath. $x$ | $\beta=\mathrm{Im}(X)$ | $\mathrm{Re}({\sqrt{X+Y}})$ | $\mathrm{Re}({\mathrm{i}z_{-}})$ | $\mathrm{Re}(w(iz_{-}))$ | $K_{\text{sdv}}$
---|---|---|---|---|---
10 | 5000000000.0 | 500000000.0000001 | 1.1920928955078125e-07 | 6.829164078387363e-10 | 1.187268242909783e-10
| 5000000000.0 | 500000000.0000001 | 1.0849999999999996e-07 | 6.215659511546557e-10 | 5.737636760689775e-11
| 5000000000.0 | 500000000.0000001085 | 0.00000010849999999999994482775 | 6.2156585550296477893431e-10 | 5.73762544921658255221444e-11
12 | 6000000000.0 | 500000000.0000001 | 1.1920928955078125e-07 | 4.720118241361795e-10 | -9.217775941157818e-11
| 6000000000.0 | 500000000.0000001 | 1.5249999999999992e-07 | 6.038271231846435e-10 | 3.9637539636885786e-11
| 6000000000.0 | 500000000.0000001525 | 0.00000015249999999999988890375 | 6.03827085623295707495819e-10 | 3.96375257362927384521548e-11

## References

  * Armstrong [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.
  * Dicke [1953] R. H. Dicke.  The effect of collisions upon the Doppler width of spectral lines.  _Phys. Rev._ , 89:472–473, 1953.  doi: 10.1103/PhysRev.89.472.
  * Varghese and Hanson [1984] P.L. Varghese and R.K. Hanson.  Collisional narrowing effects on spectral line shapes measured at high resolution.  _Appl. Opt._ , 23(14):2376–2385, 1984.  doi: 10.1364/AO.23.002376.
  * Hartmann et al. [2008] J.M. Hartmann, C. Boulet, and D. Robert.  _Collisional Effects on Molecular Spectra_.  Elsevier, 2008.
  * Tennyson et al. [2014] J. Tennyson, P.F. Bernath, A. Campargue, A.G. Császár, L. Daumont, R.R. Gamache, J.T. Hodges, D. Lisak, O.V. Naumenko, L.S. Rothman, H. Tran, N.F. Zobov, J. Buldyreva, C.D. Boone, M.D. De Vizia, L. Gianfrani, J.-M. Hartmann, R. McPheat, D. Weidmann, J. Murray, N.H. Ngo, and O.L. Polyansky.  Recommended isolated-line profile for representing high-resolution spectroscopic transitions (IUPAC technical report).  _Pure Appl. Chem._ , 86(12):1931–1943, 2014\.  doi: 10.1515/pac-2014-0208.
  * Tran et al. [2013] H. Tran, N.H. Ngo, and J.-M. Hartmann.  Efficient computation of some speed-dependent isolated line profiles.  _J. Quant. Spectrosc. & Radiat. Transfer_, 129:199 – 203, 2013.  doi: 10.1016/j.jqsrt.2013.06.015.  Erratum: JQSRT 134, 104 (2014).
  * Schneider and Hase [2009] M. Schneider and F. Hase.  Improving spectroscopic line parameters by means of atmospheric spectra: Theory and example for water vapor and solar absorption spectra.  _J. Quant. Spectrosc. & Radiat. Transfer_, 110(17):1825 – 1839, 2009.  doi: 10.1016/j.jqsrt.2009.04.011.
  * Schneider et al. [2011] M. Schneider, F. Hase, J.-F. Blavier, G.C. Toon, and T. Leblanc.  An empirical study on the importance of a speed-dependent Voigt line shape model for tropospheric water vapor profile remote sensing.  _J. Quant. Spectrosc. & Radiat. Transfer_, 112(3):465–474, 2011.  doi: 10.1016/j.jqsrt.2010.09.008.
  * Boone et al. [2007] C.D. Boone, K.A. Walker, and P.F. Bernath.  Speed–dependent Voigt profile for water vapor in infrared remote sensing applications.  _J. Quant. Spectrosc. & Radiat. Transfer_, 105:525–532, 2007.  doi: 10.1016/j.jqsrt.2006.11.015.
  * Kuze et al. [2009] A. Kuze, H. Suto, M. Nakajima, and T. Hamazaki.  Thermal and near infrared sensor for carbon observation Fourier-transform spectrometer on the Greenhouse Gases Observing Satellite for greenhouse gases monitoring.  _Appl. Opt._ , 48(35):6716–6733, 2009.  doi: 10.1364/AO.48.006716.
  * Crisp et al. [2004] D. Crisp, R.M. Atlas, F.-M. Breon, L.R. Brown, J.P. Burrows, P. Ciais, B.J. Connor, S.C. Doney, I.Y. Fung, D.J. Jacob, C.E. Miller, D. O’Brien, S. Pawson, J.T. Randerson, P. Rayner, R.J. Salawitch, S.P. Sander, B. Sen, G.L. Stephens, P.P. Tans, G.C. Toon, P.O. Wennberg, S.C. Wofsy, Y.L. Yung, Z. Kuang, B. Chudasama, G. Sprague, B. Weiss, R. Pollock, D. Kenyon, and S. Schroll.  The orbiting carbon observatory (OCO) mission.  _Adv. Space Res._ , 34(4):700 – 709, 2004.  doi: 10.1016/j.asr.2003.08.062.
  * Veefkind et al. [2012] J.P. Veefkind, I. Aben, K. McMullan, H. Förster, J. de Vries, G. Otter, J. Claas, H.J. Eskes, J.F. de Haan, Q. Kleipool, M. van Weele, O. Hasekamp, R. Hoogeveen, J. Landgraf, R. Snel, P. Tol, P. Ingmann, R. Voors, B. Kruizinga, R. Vink, H. Visser, and P.F. Levelt.  TROPOMI on the ESA Sentinel-5 Precursor: A GMES mission for global observations of the atmospheric composition for climate, air quality and ozone layer applications.  _Remote Sensing of Environment_ , 120:70 – 83, 2012.  doi: 10.1016/j.rse.2011.09.027.  The Sentinel Missions - New Opportunities for Science.
  * Nikitin et al. [2010] A.V. Nikitin, O.M. Lyulin, S.N. Mikhailenko, V.I. Perevalov, N.N. Filippov, I.M. Grigoriev, I. Morino, T. Yokota, R. Kumazawa, and T. Watanabe.  GOSAT-2009 methane spectral line list in the 5550 – $6236\rm\,cm^{-1}$ range.  _J. Quant. Spectrosc. & Radiat. Transfer_, 111(12-13):2211–2224, 2010.  doi: 10.1016/j.jqsrt.2010.05.010.
  * Nikitin et al. [2015] A.V. Nikitin, O.M. Lyulin, S.N. Mikhailenko, V.I. Perevalov, N.N. Filippov, I.M. Grigoriev, I. Morino, Y. Yoshida, and T. Matsunaga.  GOSAT-2014 methane spectral line list.  _J. Quant. Spectrosc. & Radiat. Transfer_, 154:63 – 71, 2015.  doi: 10.1016/j.jqsrt.2014.12.003.
  * Oyafuso et al. [2017] F. Oyafuso, V.H. Payne, B.J. Drouin, V.M. Devi, D.C. Benner, K. Sung, S. Yu, I.E. Gordon, R. Kochanov, Y. Tan, D. Crisp, E.J. Mlawer, and A. Guillaume.  High accuracy absorption coefficients for the Orbiting Carbon Observatory-2 (OCO-2) mission: Validation of updated carbon dioxide cross-sections using atmospheric spectra.  _J. Quant. Spectrosc. & Radiat. Transfer_, 203:213 – 223, 2017.  doi: 10.1016/j.jqsrt.2017.06.012.  HITRAN2016 Special Issue.
  * Galli et al. [2014] A. Galli, S. Guerlet, A. Butz, I. Aben, H. Suto, A. Kuze, N. M. Deutscher, J. Notholt, D. Wunch, P. O. Wennberg, D. W. T. Griffith, O. Hasekamp, and J. Landgraf.  The impact of spectral resolution on satellite retrieval accuracy of $\mathrm{CO_{2}}$ and $\mathrm{CH_{4}}$.  _Atmos. Meas. Tech._ , 7(4):1105–1119, 2014\.  doi: 10.5194/amt-7-1105-2014.
  * Checa-Garcia et al. [2015] R. Checa-Garcia, J. Landgraf, A. Galli, F. Hase, V.A. Velazco, H. Tran, V. Boudon, F. Alkemade, and A. Butz.  Mapping spectroscopic uncertainties into prospective methane retrieval errors from Sentinel-5 and its precursor.  _Atmos. Meas. Tech._ , 8(9):3617–3629, 2015\.  doi: 10.5194/amt-8-3617-2015.
  * Hochstaffl and Schreier [2020a] P. Hochstaffl and F. Schreier.  Impact of molecular spectroscopy on carbon monoxide abundances from SCIAMACHY.  _Remote Sensing_ , 12(7):1084, 2020a.  doi: 10.3390/rs12071084.
  * Hochstaffl and Schreier [2020b] P. Hochstaffl and F. Schreier.  Impact of molecular spectroscopy on carbon monoxide abundances from TROPOMI.  _Remote Sensing_ , October 2020b.  Manuscript accepted subject to minor revisions.
  * Birk et al. [2017] M. Birk, G. Wagner, J. Loos, D. Mondelain, and A. Campargue.  ESA SEOM–IAS - spectroscopic parameters database $2.3\rm\,\mu m$ region [data set].  Zenodo, 2017.  URL http://doi.org/10.5281/zenodo.1009126.
  * Gordon et al. [2017] I.E. Gordon, L.S. Rothman, et al.  The HITRAN2016 molecular spectroscopic database.  _J. Quant. Spectrosc. & Radiat. Transfer_, 203:3 – 69, 2017.  doi: 10.1016/j.jqsrt.2017.06.038.
  * Schreier [2017] F. Schreier.  Computational aspects of speed-dependent Voigt profiles.  _J. Quant. Spectrosc. & Radiat. Transfer_, 187:44–53, 2017.  doi: 10.1016/j.jqsrt.2016.08.009.
  * Schreier [2011] F. Schreier.  Optimized implementations of rational approximations for the Voigt and complex error function.  _J. Quant. Spectrosc. & Radiat. Transfer_, 112(6):1010–1025, 2011.  doi: 10.1016/j.jqsrt.2010.12.010.
  * Schreier [2018] F. Schreier.  The Voigt and complex error function: Humlíček’s rational approximation generalized.  _Mon. Not. Roy. Astron. Soc._ , 479(3):3068–3075, 2018.  doi: 10.1093/mnras/sty1680.
  * Loos et al. [2017a] J. Loos, M. Birk, and G. Wagner.  Measurement of air-broadening line shape parameters and temperature dependence parameters of $\mathrm{H_{2}O}$ lines in the spectral ranges $1850\mbox{--}2280\rm\,cm^{-1}$ and $2390\mbox{--}4000\rm\,cm^{-1}$.  _J. Quant. Spectrosc. & Radiat. Transfer_, 203:103 – 118, 2017a.  doi: 10.1016/j.jqsrt.2017.03.033.
  * Loos et al. [2017b] J. Loos, M. Birk, and G. Wagner.  Measurement of positions, intensities and self-broadening line shape parameters of $\mathrm{H_{2}O}$ lines in the spectral ranges $1850\mbox{--}2280\rm\,cm^{-1}$ and $2390\mbox{--}4000\rm\,cm^{-1}$.  _J. Quant. Spectrosc. & Radiat. Transfer_, 203:119 – 132, 2017b.  doi: 10.1016/j.jqsrt.2017.02.013.
  * Wcislo et al. [2016] P. Wcislo, I.E. Gordon, H. Tran, Y. Tan, S.-M. Hu, A. Campargue, S. Kassi, D. Romanini, C. Hill, R.V. Kochanov, and L.S. Rothman.  The implementation of non-Voigt line profiles in the HITRAN database: $\mathrm{H_{2}}$ case study.  _J. Quant. Spectrosc. & Radiat. Transfer_, 177:175–191, 2016.  doi: 10.1016/j.jqsrt.2016.01.024.
  * Gamache and Vispoel [2018] R.R. Gamache and B. Vispoel.  On the temperature dependence of half-widths and line shifts for molecular transitions in the microwave and infrared regions.  _J. Quant. Spectrosc. & Radiat. Transfer_, 217:440 – 452, 2018.  doi: 10.1016/j.jqsrt.2018.05.019.
  * Stolarczyk et al. [2020] N. Stolarczyk, F. Thibault, H. Cybulski, H. Jóźwiak, G. Kowzan, B. Vispoel, I.E. Gordon, L.S. Rothman, R.R. Gamache, and P. Wcisło.  Evaluation of different parameterizations of temperature dependences of the line-shape parameters based on ab initio calculations: Case study for the HITRAN database.  _J. Quant. Spectrosc. & Radiat. Transfer_, 240:106676, 2020.  doi: 10.1016/j.jqsrt.2019.106676.
  * Abramowitz and Stegun [1964] M. Abramowitz and I.A. Stegun.  _Handbook of Mathematical Functions_.  National Bureau of Standards, AMS55, New York, 1964.
  * Olver 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 [32].
  * [32] DLMF.  _NIST Digital Library of Mathematical Functions_.  National Institute of Standards and Technology.  URL http://dlmf.nist.gov/.  Online companion to [31].
  * Boone et al. [2011] C.D. Boone, K.A. Walker, and P.F. Bernath.  An efficient analytical approach for calculating line mixing in atmospheric remote sensing applications.  _J. Quant. Spectrosc. & Radiat. Transfer_, 112(6):980 – 989, 2011.  doi: 10.1016/j.jqsrt.2010.11.013.
  * Humlíček [1979] J. Humlíček.  An efficient method for evaluation of the complex probability function: the Voigt function and its derivatives.  _J. Quant. Spectrosc. & Radiat. Transfer_, 21:309–313, 1979.  doi: 10.1016/0022-4073(79)90062-1.
  * Humlíček [1982] J. Humlíček.  Optimized computation of the Voigt and complex probability function.  _J. Quant. Spectrosc. & Radiat. Transfer_, 27:437–444, 1982.  doi: 10.1016/0022-4073(82)90078-4.
  * Weideman [1994] J.A.C. Weideman.  Computation of the complex error function.  _SIAM J. Num. Anal._ , 31:1497–1518, 1994.  doi: 10.1137/0731077.
  * Johansson et al. [2013] Fredrik Johansson et al.  _mpmath: a Python library for arbitrary-precision floating-point arithmetic (version 0.18)_ , December 2013.  http://mpmath.org/.
  * Panchekha et al. [2015] P. Panchekha, A. Sanchez-Stern, J.R. Wilcox, and Z. Tatlock.  Automatically improving accuracy for floating point expressions.  In _PLDI ’15: Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation_. Association for Computing Machinery, 2015.  doi: 10.1145/10.1145/2737924.2737959.  URL https://herbie.uwplse.org/pldi15-paper.pdf.
  * Johnson [Last access August 2020] S.G. Johnson.  Faddeeva package, Last access August 2020.  URL http://ab-initio.mit.edu/Faddeeva.
  * Johnson and Wuttke [Last access August 2020] S.G. Johnson and J. Wuttke.  libcerf, numeric library for complex error functions, Last access August 2020.  URL https://jugit.fz-juelich.de/mlz/libcerf.
  * Whiting [1968] E.E. Whiting.  An empirical approximation to the Voigt profile.  _J. Quant. Spectrosc. & Radiat. Transfer_, 8:1379–1384, 1968.  doi: 10.1016/0022-4073(68)90081-2.
  * Goedecker and Hoisie [2001] Stefan Goedecker and Adolfy Hoisie.  _Performance Optimization of Numerically Intensive Codes_.  SIAM, Philadelphia, PA, 2001.
  * Gimeno García et al. [2011] S. Gimeno García, F. Schreier, G. Lichtenberg, and S. Slijkhuis.  Near infrared nadir retrieval of vertical column densities: methodology and application to SCIAMACHY.  _Atmos. Meas. Tech._ , 4(12):2633–2657, 2011\.  doi: 10.5194/amt-4-2633-2011.
  * Anderson et al. [1986] G.P. Anderson, S.A. Clough, F.X. Kneizys, J.H. Chetwynd, and E.P. Shettle.  AFGL atmospheric constituent profiles (0 – $\rm 120\,km$).  Technical Report TR-86-0110, AFGL, 1986.
  * Schreier et al. [2019] F. Schreier, S. Gimeno García, P. Hochstaffl, and S. Städt.  Py4CAtS — PYthon for Computational ATmospheric Spectroscopy.  _Atmosphere_ , 10(5):262, 2019.  doi: 10.3390/atmos10050262.

##  Appendix A Example of the SDV calculation for small values of $y$ and $q$

To further illustrate the discussion of subsection 3.2 a comparsion for two
values of $x$ and for $y=10^{-8}$ and $q=0.1y$ is given in Tab. 4. The numbers
shown here are copied from the (I)Python shell output without any formatting
of the print statement. Note that for the mpmath calculations shown here a
“triple precision” has been exploited (mp.dps=24), in contrast to the
quadruple precision used for Fig. 4.

##  Appendix B Code snippets used for time benchmarks

For the first test assessing the performance of the various ways to evaluate
the complex square root and the difference thereof the SDV has been computed
on the “matrix” of $x$ and $y$ values used for all contour plots (note that
Python is case sensitive):

    In [1]: from sdv import *
    In [2]: # standard Voigt variables
        ...: xx=np.linspace(0.,25.,251)  # linear grid
        ...: yy=np.logspace(-8,2,101)    # logarithmic grid
        ...: # kind of ’matrices’ required for contour plots
        ...: XX, YY = np.meshgrid(xx, yy)
        ...: ZZ = XX +1j*YY
    In [3]: %timeit sdv_safe(XX, YY, 0.1*YY, cpf16p)

In the second test the SDR has been calculated for the 101 $y$ values as
defined above with an equidistant $x$ grid in the interval defined by the
Voigt function half width:

    xx=np.linspace(0.,25.,251)
    yy=np.logspace(-8,2,101)
    %%timeit
    for y in yy:
        xHalf = whiting(y); xx=arange(0.0,100*xHalf,xHalf/5)
        sdr(xx, y, 0.1*y, 0.1*y, cpf16p)


# TeamTrack:
A Dataset for Multi-Sport Multi-Object Tracking in Full-pitch Videos

Atom Scott1,4,∗, Ikuma Uchida2,4, Ning Ding1, Rikuhei Umemoto1, Rory Bunker1,
Ren Kobayashi1,
Takeshi Koyama3, Masaki Onishi4, Yoshinari Kameda2, Keisuke Fujii1
1Nagoya University, 2University of Tsukuba, 3Tokai University, 4AIST
∗Corresponding Author
https://atomscott.github.io/TeamTrack/

###### Abstract

Multi-object tracking (MOT) is a critical and challenging task in computer
vision, particularly in situations involving objects with similar appearances
but diverse movements, as seen in team sports. Current methods, largely
reliant on object detection and appearance, often fail to track targets in
such complex scenarios accurately. This limitation is further exacerbated by
the lack of comprehensive and diverse datasets covering the full view of
sports pitches. Addressing these issues, we introduce TeamTrack, a pioneering
benchmark dataset specifically designed for MOT in sports. TeamTrack is an
extensive collection of full-pitch video data from various sports, including
soccer, basketball, and handball. Furthermore, we perform a comprehensive
analysis and benchmarking effort to underscore TeamTrack’s utility and
potential impact. Our work signifies a crucial step forward, promising to
elevate the precision and effectiveness of MOT in complex, dynamic settings
such as team sports. The dataset, project code and competition is released at:
https://atomscott.github.io/TeamTrack/.

Figure 1: Example of our TeamTrack dataset. We provide (a) top-view and (b)
side-view in soccer, (c) top-view and, (d)/(e) two side-view videos in
basketball, and (f) a single side-view video in handball.

##  1 Introduction

Multi-object tracking (MOT) is a key task in computer vision, critical for
many practical applications such as autonomous driving and human movement
analysis [27, 35, 24, 29]. MOT involves localizing and associating objects
over time while dealing with unsolved challenges like occlusion, mis-
detections, and ID switches. Current methods typically employ detection
followed by re-identification (ReID), relying on appearance-based features for
temporal association [40, 45]. However, these methods falter when confronted
with objects of similar appearances performing complex movements, which are
common in team sports.

In sports analytics, the use of advanced metrics has increased, and the need
for fine-grained tracking data has become increasingly evident [31, 7, 36].
Although sensor-based systems, such as the global navigation satellite system
and local positioning systems, have emerged as alternatives, these systems
have constraints related to availability, budget, and feasibility [26, 15].
Additionally, gaining information on opposing teams can be problematic. As a
result, MOT remains a desirable solution, providing a non-intrusive and
affordable method for acquiring data.

In light of these considerations, we introduce the TeamTrack Dataset, a
specialized resource developed to address the unique challenges posed by team
sports tracking. Unlike existing datasets, which predominantly feature
pedestrian movements or are derived from broadcast footage with limited field
coverage, TeamTrack offers an expansive view of the game by incorporating over
200,000 frames and 4 million bounding boxes across football, handball, and
basketball, marking it as the largest dataset of its kind in terms of volume
and scope, as shown in Table 1. This extensive compilation provides a
panoramic view of game scenarios to capture dense player formations, swift
motion variations, and frequent occlusions, thereby setting a new benchmark
for MOT research in sports.

The primary contributions of this paper are three-fold: (1) We create a new
dataset111Available on Kaggle ( kaggle.com/datasets/atomscott/teamtrack) or
Google drive (https://bit.ly/3CMN2hP)., comprising of an unprecedented volume
of high-resolution, full-pitch video data from diverse team sports, and
multiple viewpoints. (2) A detailed exploration of the dataset’s development
process, its strategic focus, and an analysis highlighting its
characteristics, which promise significant advancements in sports analytics
and broader MOT applications. (3) We perform comprehensive evaluations of
object detection, trajectory forecasting, and multiple object tracking tasks,
setting benchmarks for future research and development.

##  2 Related Work

Dataset | Frames | BBoxes | Domain
---|---|---|---
MOT16 [24] | 11,235 | 292,733 | Pedestrians
MOT20 [8] | 13,410 | 1,652,040 | Pedestrians
KITTI-T [12] | 10,870 | 65,213 |  Autonomous Driving
DanceTrack [35] | 105,855 | - | Dance
SSET [10] | 12,000 | 12,000 | Soccer
SN-Tracking [5] | 225,375 | 3,645,661 | Soccer
SportsMOT [6] | 150,379 | 1,629,490 |  Soccer Basketball Volleyball
SoccerTrack[29] | 82,800 | 2,484,000 | Soccer
TeamTrack (ours) | 279,900 | 4,374,900 |  Soccer Basketball Handball
Table 1: Comparative overview of MOT datasets, showcasing TeamTrack with the
highest number of frames and bounding boxes.

Multi-Object Tracking. The typical approach to MOT algorithms follows the
tracking-by-detection paradigm. This procedure starts with an object detection
using models like RetinaNet [19], CenterNet [9], or YOLO [28], followed by
association via feature extraction, typically achieved by using CNNs [13, 45]
and recently ViT models [14, 30]. DeepSORT [40] exemplifies this approach,
combining Kalman motion states and deep appearance descriptors for robust
tracking. However, these methods often struggle to distinguish and track
objects with similar appearances.

End-to-end tracking methodologies, on the other hand, handle object detection
and tracking concurrently, offering potential improvements in performance.
Models like Tracktor [2] leverage frame redundancy to eliminate separate data
association, while Neural Solver [3] and DeepMOT [41] deploy neural and
Siamese networks, respectively, to address tracking. Recent developments have
seen the introduction of Transformer architectures into tracking, such as in
DETR [4], formulating object detection as a set prediction problem. This
paradigm shift has been adopted by models like Trackformer [23] and TransTrack
[34]. More advanced models, like MOTR [42] and its improved version MOTRv2
[44], extend this framework by adding a query-interaction module to enhance
tracking performance.

Tracking in Sports. In sports tracking, a survey [22] summarized various
approaches using a combination of background subtraction, triangulation from
multiple cameras, and Kalman filters to track player movements on the pitch
[17]. Additionally, research exists which addresses this issue by representing
player positions as nodes on a graph, and trajectories as edges between nodes
[11, 32]. Sullivan et al. proposed a Bayesian framework for linking player IDs
[33]. Furthermore, Lu et al. presented a learning approach based on
handcrafted visual features and a Kalman filter to identify and track players
within videos [43].

Recent methods have largely focused on using deep learning techniques for
player tracking. For instance, Hurault et al. proposed a method of detecting
and tracking soccer players using a self-supervised learning method, by
transfer learning from an object detection model trained on generic objects
[16]. Theagarajan et al. identified the player holding the ball using a YOLOv2
network detector and a DeepSORT tracker [37]. Maglo et al. utilized human
annotations collected in a semi-interactive system [21]. Wang et al. proposed
improving tracking in various sports scenes by introducing a three-stage
matching process to solve motion blur and body overlap [38].

Multi-Object Tracking Datasets. Development of MOT algorithms depends on the
availability of annotated datasets. Early examples are the MOT Challenge
dataset [24] and the KITTI Tracking Benchmark [12], focusing on a range of
scenarios from crowded urban environments to autonomous driving. Later
datasets like UA-DETRAC [39], PETS [25], and DanceTrack [35] further
contributed to the field, annotated with bounding boxes and tracking IDs to
evaluate algorithmic tracking accuracy.

Tracking in sports presents unique challenges, such as difficulty in
differentiating players on the same team and handling occlusion scenarios.
While datasets like SoccerNet-Tracking [5] and SoccerTrack [29] provide
valuable resources, their focus is often limited to specific sports or partial
field views. Furthermore, the use of broadcast footage in datasets such as
SportsMOT [6] complicates the direct application of tracking algorithms,
necessitating additional processing for image registration, handling zoom, and
scene transitions.

The landscape of MOT datasets shows a notable lack of resources tailored for
the nuanced challenges of sports tracking. Addressing this, TeamTrack
introduces a high-resolution, full-pitch dataset across soccer, basketball,
and handball, providing over 279,900 frames and 4,374,900 bounding boxes—the
largest in its field. It supports the development of algorithms for complex
team sports dynamics. With sports diversity and two perspectives—side and top
views—TeamTrack offers comprehensive playfield insights, fostering the
development of more sophisticated MOT methods. This dataset aims to drive
research forward, making high-quality tracking data accessible and encouraging
the creation of robust algorithms to navigate sports tracking’s unique
challenges.

Table 2: Camera and video details of the multi-object tracking dataset for
various sports.

Sport | Perspective | Location | Device | Resolution | Minutes | Bounding Box Count
---|---|---|---|---|---|---
Soccer | Side (Fisheye) | University of Tsukuba, Outdoor | Z CAM E2-F8 | 8K | 30 | 1,242,000
Soccer | Top (Drone) | University of Tsukuba, Outdoor | DJI Mavic 3 | 4K | 30 | 1,242,000
Basketball | Side (Fisheye) | Tokai University, Indoor | Z CAM E2-F6 | 6K | 17.5 | 346,500
Basketball | Top (Drone) | Wuhu Institute of Technology, Outdoor | DJI Mavic 3 | 4K | 24 | 475,200
Basketball | Side (Drone) | Wuhu Institute of Technology, Outdoor | DJI Mavic 3 | 4K | 24 | 475,200
Handball | Side (Fisheye) | Nagoya University, Indoor | Z CAM E2-F6 | 6K | 30 | 594,000
Total |  |  |  |  | 155.5 | 4,374,900

##  3 TeamTrack Dataset

In this section, we present TeamTrack, a novel MOT dataset comprising over 150
minutes of high-resolution video from multiple team sports. The main
characteristics of TeamTrack are the following:

Large-scale: TeamTrack introduces over 4 million annotated bounding boxes
across various tracklets, making it one of the largest datasets of its kind,
as compared to others listed in Table 2.

Multiple Sports: TeamTrack includes matches from three team sports; soccer,
basketball, and handball.

Similar Appearance and Dynamic Movement: The dataset features targets with
similar appearance, dynamic movements, and frequent occlusions, offering a
robust challenge for tracking algorithms.

Full Pitch Multi Angle View: Videos are recorded from two angles, top view via
drones and side view with fisheye lenses, both covering the entire playing
field.

Beyond its significant size and the inherent challenges it presents,
TeamTrack’s unique value lies in its multi-view and full-pitch capture
settings. These features enable experimentation with multi-view tracking and
the use of prior information (e.g., player count, pitch dimensions) not
feasible with traditional broadcast videos. Additionally, we hope the
adversarial-cooperative nature of team sports can also be studied to further
refine tracking techniques.

In the following subsections, we describe the data collection process,
annotation and labeling, appearance similarity, and motion patterns observed
in the TeamTrack dataset, following the methodology described in DanceTrack
[35]. Our dataset was compared to DanceTrack, MOT17, and MOT20—datasets
characterized by limited camera movements. We did not compare with broadcast
video datasets, such as SoccerNet-Tracking [5] and SportsMOT [6], due to their
extensive camera movements, which hinder fair comparison.

###  3.1 Data Collection

The data collection process captured video footage across three team sports:
soccer, basketball, and handball, recorded at various university venues,
encompassing both indoor and outdoor environments. The side and top views were
recorded using fisheye and drone cameras, respectively. To correct for the
distortion caused by the fisheye lens, we applied Zhang’s calibration method.
Further information on the devices used and their resolution specifications is
detailed in Table 2.

###  3.2 Annotation and Labeling

Figure 2: Screenshot of Labelbox during the annotation process, illustrating
manual adjustments to automated tracking and interpolation annotations.

The annotation process involved a series of strategic decisions and tool
evaluations to balance efficiency, accuracy, and cost. Initially, we utilized
the open-source tool CVAT but later transitioned to Labelbox to alleviate the
burdens associated with working on a local server and to streamline workflows
more effectively. Although Labelbox did also offer automated tracking, the
practical gains in speed were limited due to inference time not being fast
enough.

Interpolation and Manual Annotation: Both CVAT andLabelbox support
interpolation, significantly reducing the need to annotate every frame. This
feature enabled focused manual annotation on approximately every 1 to 50
frames, as depicted in the timeline of Fig. 2, especially in scenes
experiencing dynamic changes. While this method streamlined the workflow, it
still required significant manual input to ensure accuracy.

Challenges with Semi-Automatic Detection: We experimented with semi-automatic
detection using a pretrained object detector for initial annotations. However,
the time saved was often offset by the need to correct false
positives/negatives and manage ID switches. Labelbox’s lack of track merging
capabilities further complicated these adjustments, as illustrated by the
comparative analysis of pretrained versus fine-tuned object detectors’
accuracy in Table. 3, indicating the necessity for model fine-tuning.

Exploration of Other Tools: In search of more efficient solutions, we
considered advanced annotation tools like V7 and Encord, known for their
sophisticated track merging and smart interpolation capabilities. However, the
high initial limited their adoption.

Annotation Effort: Ultimately, the annotation process required over 600
person-hours, translating to roughly 2 hours for every 30 seconds of video.
This significant investment of time and resources highlighted a critical
challenge: the pressing need for more efficient annotation tools to facilitate
dataset expansion and enhance the scalability of sports analytics research. We
hope these insights offer valuable perspectives to the research community on
balancing the capabilities, efficiency, and costs of annotation tools.

Dataset Metadata: The TeamTrack dataset provides persistent player IDs
throughout the entirety of a match, although it does not include jersey
numbers. Annotations are available in two formats: the SportsLabKit
format222https://github.com/AtomScott/SportsLabKit., which encompasses team
affiliations to enrich analyses of team dynamics and interactions, and the
standard MOTChallenge format333https://motchallenge.net/instructions/.. The
latter is especially useful for general tracking studies and conforms to
conventional evaluation methodologies.

###  3.3 Appearance Similarity

Figure 3: Cosine distance of re-ID features: TeamTrack compared to DanceTrack,
MOT17, and MOT20. Figure 4: Cosine distance of re-ID features within TeamTrack
datasets.

(a) Basketball Sideview 1

(b) Basketball Sideview 2

(c) Basketball Topview

(d) Handball Sideview

(e) Soccer Sideview

(f) Soccer Topview

Figure 5: Visualization of re-ID features from various videos in our TeamTrack
dataset using t-SNE. Objects are color-coded for consistent identification.
The bounding box from the first frame is superimposed on the corresponding re-
ID feature for contextualization.

Quantitave analysis of appearance features: To quantitatively test our
hypothesis that the targets in teamtrack have similar appearances, we employ a
pre-trained re-ID model [35] to extract the appearance features and calculate
a similarity metric. The similarity metric is based on the cosine distances
between these features across video frames:

$V=\frac{1}{T}\sum_{t=1}^{T}\frac{1}{N_{t}^{2}}\sum_{i=1}^{N_{t}}\sum_{j\neq
i}^{N_{t}}\left(1-\cos<F(B_{ti}),F(B_{tj})>\right),$

where $F(B_{ti})$ and $F(B_{tj})$ are appearance features, $B$ and $T$ are an
object and the number of frames in the video, $N_{t}$ is the number of objects
on the frame $t$ and $<\cdot>$ is the angle between two vectors. As depicted
in Figure 3, TeamTrack datasets generally demonstrated a higher appearance
similarity among players compared to the MOT datasets, with lower mean cosine
distances. Figure 4 shows the comparison within TeamTrack datasets,
highlighting that the similarity metric is somewhat consistent across sports.

Visualization of appearance features: To further understand the visual
characteristics of the TeamTrack dataset, we present visualizations of
appearance features extracted from several videos. In Figure 5, we show t-SNE
embeddings of image Re-ID features, extracted from the first 200 frames of
each dataset. These visualizations reveal that, although appearance features
can be differentiated in certain sports—particularly under varying background
conditions and among players from opposing teams—features of players within
the same team tend to be highly entangled. It should be noted that as the
number of frames increases, the bounding boxes for players are likely to
overlap, adding another layer of complexity to the task. This qualitatively
demonstrates the high degree of appearance similarity among within the
proposed TeamTrack dataset.

###  3.4 Motion Patterns

TeamTrack dataset includes complex group motion patterns compared to popular
pedestrian datasets. To quantitatively confirm this, we computed IoU
(Intersection-over-Union) on adjacent frames and frequency of relative
position switch as motion patterns metrics in the TeamTrack dataset and
compare them with other MOT datasets, as described in DanceTrack [35].

IoU on adjacent frames: We calculate the average IoU of bounding boxes on
adjacent frames for each video. A low IoU implies fast-moving objects or low
video frame rates. The averaged IoU on adjacent frames for a video with $N$
objects and $T$ frames is defined as follows:

$U=\frac{1}{N(T-1)}\sum_{i=1}^{N}\sum_{t=1}^{T-1}IoU(B_{ti},B_{t+1i}).$

Figure 6 shows the IoU on adjacent frames in TeamTrack and other datasets. The
results indicate that TeamTrack had a slightly lower average IoU on adjacent
frames compared to MOT17/MOT20, and a similar average IoU on adjacent frames
to DanceTrack. The lower average IoU on adjacent frames suggests that
objects/regions move, change in shape or size, or disappear to a greater
extent in TeamTrack and DanceTrack compared to MOT17/MOT20.

Figure 7 shows the results among the six TeamTrack datasets. Soccer Top View
and Handball Side View had the lowest and highest average IoU on adjacent
frames, respectively, indicating that objects maintained their position, size,
and shape to a greater extent in handball.

Figure 6: Average IoU on adjacent frames: TeamTrack compared with MOT17,
MOT20, and DanceTrack. Figure 7: Average IoU on adjacent frames: within
TeamTrack datasets. Figure 8: Frequency of relative position switch: TeamTrack
compared with MOT17, MOT20, and DanceTrack Figure 9: Frequency of relative
position switch: within TeamTrack datasets.

Frequency of relative position switch: To measure the diversity of object
motions, we compute the average frequency of relative position switches for
each video based on [35]. Frequent position switches can be attributed to
highly non-linear motion patterns and result in frequent crossovers and inter-
object occlusions. The average frequency of relative position switch is
defined as follows:

$S=\frac{\sum_{i=1}^{N}\sum_{j\neq
i}^{N}\sum_{t=1}^{T-1}sw(B_{ti},B_{tj},B_{t+1i},B_{t+1j})}{2N(T-1)(N-1)},$

where $sw$ is an indicator function, where $sw(\cdot)=1$ if the two objects
swap their left-right relative position or top-down relative position on the
adjacent frames, $sw(\cdot)=0$ if there is no swap.

Figure 8 shows the results in TeamTrack and other datasets, with DanceTrack
showing significantly higher frequencies and TeamTrack marginally exceeding
those of MOT datasets. This likely stems from the dynamics of team sports,
where intense activity often concentrates around the vicinity of the ball or
specific events such as corner kicks, potentially leading to an
underrepresentation in averaged data. Further analysis within TeamTrack, as
illustrated in Figure 9, reveals considerable differences among sports. In the
context of sports, we interpet the frequency of relative position switch to
indicate the activity/intensity level of the match; therefore, in this case,
Basketball had a higher level of intensity than Soccer and Handball.

##  4 Experiments and Evaluation

Our evaluation showcases the utility of the TeamTrack dataset and the distinct
challenges it introduces for advancing research in MOT. We concentrate on
three pivotal components: object detection (Section 4.1), trajectory
forecasting (Section 4.2), and finally, multi-object tracking (Section 4.3).
In each task we followed a conventional data splitting ratio of 70:15:15 for
training, validation, and testing sets.

###  4.1 Object Detection

Object detection is a crucial step for accurately tracking an object.
Detection accuracy typically correlates with tracking performance,
particularly with methods that employ the tracking-by-detection paradigm.

Setup: We fine-tuned the YOLOv8 model [18] on each dataset. We adjusted the
image size using YOLOv8m, YOLOv8n, and YOLOv8x. The image sizes employed were
512, 1280, and 2560. The training utilized the AdamW optimizer[20] with an
initial learning rate of 0.001, alongside data augmentation techniques
(mosaic, flipping, scaling, color jittering) to enhance model robustness.
Test-Time Augmentation (TTA) was also implemented.

Metrics: We evaluate the performance of the model using the mean Average
Precision (mAP) with intersection over union (IoU) thresholds ranging from 0.5
to 0.95 (mAP50:95). This metric measures the model’s accuracy in terms of both
position and size of the predicted bounding boxes.

Results: Table 3 showcases YOLOv8’s object detection performance across
various sports, separated by camera perspectives. The notably lower mAP scores
for pre-trained and fine-tuned models in top-view setup can be largely
attributed to the smaller appearance of players from high-altitude drone
footage. This results in smaller IoU values, making it challenging to achieve
high (mAP50:95) scores. Nevertheless, fine-tuning significantly improved the
mAP scores for all sports and views. The result underscores the importance of
fine-tuning for enhancing model performance and highlight the influence of
camera perspective on detection accuracy.

Table 3: COCO mAP50:95 performance of the object detection model on different sports, split by TV (Top-View) and SV (Side-View) camera perspectives. For basketball, SV* denotes the side view with drone camera. | Football | Basketball | Handball
---|---|---|---
YOLOv8 | TV | SV | TV | SV | SV* |  SV |
Pre-trained | 1.4 | 11.2 | 2.5 | 15.4 | 10.5 |  9.8 |
Fine-tuned | 23.5 | 52.7 | 66.6 | 68.7 | 68.6 |  71.0 |

###  4.2 Trajectory Forecasting

Trajectory forecasting involves predicting future positions of subjects and
can enhance object tracking. For instance, it facilitates the re-
identification or continued tracking of objects lost due to occlusions, This
is particularly critical in scenarios where appearance cues are unreliable,
such as in team sports. We implement both Constant Velocity and LSTM motion
models to analyze the movement patterns of individual players within the
teamstrack dataset, aiming to grasp the motion characteristics of the
TeamTrack dataset.

Setup: We adopted the experiment settings from social-LSTM [1], observing
trajectories for 3.2 seconds and predicting the trajectories for the next 4.8
seconds (144 frames). The data was centralized and normalized, and a 5%
overlap sliding window was employed. Data augmentation was carried out by
horizontal and vertical flipping on each sequence. Standard procedures, such
as teacher forcing and learning rate scheduling, were implemented.

Metrics: Our trajectory forecasting model is assessed based on its Root Mean
Square Error (RMSE) for one step ahead prediction. RMSE is a standard metric
used in trajectory forecasting as it provides an aggregate measure of
prediction error. It quantifies how much, on average, our model’s predictions
deviate from the actual data. A lower RMSE indicates a more accurate model,
providing a reliable means of comparing different models or setups.

Results: Table 4 showcases the RMSE of both motion models across different
sports, measured immediately (1 frame) and a few seconds (144 frames) post-
observation. Errors tend to accumalte over time. LSTM generally outperforms,
validating the hypothesis that TeamTrack dataset has diverse and non-linear
movement. Incorporating team labels and models that capture player
interactions, such as graph neural networks, could further improve accuracy,
presenting an avenue for future research.

Table 4: RMSEs of the trajectory forecasting models on different sports, which are averaged over all trajectories. Video | Football | Basketball | Handball
---|---|---|---
Model/Frames | 1 | 144 | 1 | 144 | 1 | 144
Constant | 0.04 | 7.99 | 0.06 | 7.68 | 0.04 | 6.08
LSTM | 0.02 | 6.50 | 0.04 | 5.19 | 0.02 | 4.07

###  4.3 Multiple Object Tracking

In this section, we present a direct evaluation our proposed TeamTrack dataset
by applying two state-of-the-art tracking algorithms, ByteTrack and BoT-SORT.
Additionally, we compare these results with earlier benchmarks performed on
the MOT17 and DanceTrack datasets to highlight the challenges posed by our
TeamTrack dataset.

Setup: Similar our prior experiments, we split the dataset and proceeded to
train YOLOv8 detectors on the training set, followed by hyperparameter
optimization using the validation set. For our evaluations, we employed the
Ultralytics versions of ByteTrack and BoT-SORT. When comparing to the
DanceTrack and MOT17 datasets, we concentrated on ByteTrack alone due to the
public availability of results for both datasets, allowing for a direct
comparison of performance across all sports within the TeamTrack dataset.

Metrics: To evaluate the different aspects of tracking, we report results
using several commonly used metrics: HOTA, MOTA, IDF1, DetA, and AssA. Each
metric uniquely emphasizes aspects of detection (DetA), association
performance (AssA, IDF1), or both (HOTA, MOTA), providing a comprehensive
evaluation of tracking capabilities.

Results: The results across different sports and view perspectives, detailed
in Table 5(f). Both methods showed similar trends. In the Handball SideView,
models achieved the highest HOTA, indicating effective tracking capabilities
in this setting. The Basketball scenarios, SideView, SideView2 and TopView,
revealed contrasting outcomes: the SideView2 posed significant challenges,
while the TopView showed better performance metrics, suggesting variations in
model efficacy based on the angle of view. In the Soccer datasets, the
SideView perspective generally yielded better performance compared to the
TopView. Table 6 shows a comparison of these scores compared to those of other
datasets. Although TeamTrack’s average scores across all sports do not
position it as the most challenging dataset, the variability within specific
sports and perspectives underscores its diversity and complexity. This
variability marks TeamTrack as a uniquely challenging dataset for developing
and evaluating tracking algorithms.

Table 5: Performance of the various MOT models.

Method | HOTA | DetA | AssA | MOTA | IDF1
---|---|---|---|---|---
BoT-SORT | 58.4 | 62.8 | 54.5 | 84.2 | 73.8
ByteTrack | 59.3 | 64.4 | 54.7 | 86.4 | 74.2
(a) Soccer SideView Method | HOTA | DetA | AssA | MOTA | IDF1
---|---|---|---|---|---
BoT-SORT | 51.9 | 51.1 | 53.3 | 42.7 | 65.7
ByteTrack | 53.7 | 51.4 | 56.5 | 43.3 | 69.2
(b) Soccer TopView

Method | HOTA | DetA | AssA | MOTA | IDF1
---|---|---|---|---|---
BoT-SORT | 75.2 | 79.2 | 71.4 | 94.3 | 85.9
ByteTrack | 76.2 | 75.5 | 76.9 | 89.3 | 88.6
(c) Basketball SideView Methods | HOTA | DetA | AssA | MOTA | IDF1
---|---|---|---|---|---
BoT-SORT | 47.3 | 67.6 | 33.1 | 80.2 | 50.8
ByteTrack | 42.9 | 54.7 | 33.7 | 65.0 | 53.6
(d) Basketball SideView2

Method | HOTA | DetA | AssA | MOTA | IDF1
---|---|---|---|---|---
BoT-SORT | 66.3 | 62.7 | 70.3 | 89.0 | 93.9
ByteTrack | 65.7 | 65.1 | 66.4 | 89.6 | 92.0
(e) Basketball TopView Methods | HOTA | DetA | AssA | MOTA | IDF1
---|---|---|---|---|---
BoT-SORT | 75.1 | 75.5 | 74.7 | 91.6 | 89.7
ByteTrack | 73.5 | 73.8 | 73.2 | 89.4 | 87.6
(f) Handball SideView

Table 6: ByteTrack tracking metrics compared across various datasets,
including average scores from TeamTrack and individual scores from sports with
the highest (Basketball-SV) and lowest (Basketball-SV2) HOTA scores.

Dataset | HOTA | DetA | AssA | MOTA | IDF1
---|---|---|---|---|---
TeamTrack Ave. | 61.9 | 64.2 | 60.2 | 77.2 | 77.5
Basketball-SV | 76.2 | 75.5 | 76.9 | 89.3 | 88.6
Basketball-SV2 | 42.9 | 54.7 | 33.7 | 65 | 53.6
MOT17 | 63.1 | 64.5 | 62 | 80.3 | 77.3
DanceTrack | 47.1 | 70.5 | 31.5 | 88.2 | 51.9

##  5 Conclusion

In this study, we introduced TeamTrack, a dataset for multi-object tracking
(MOT). The TeamTrack dataset captures object appearances and movements across
football, basketball, and handball games using full-pitch, high-resolution
videos. Our work included experiments in object detection, trajectory
forecasting, and MOT. Our findings reveal opportunities for further research.
Specifically, the TeamTrack dataset has limitations regarding team and venue
diversity. Expanding the dataset to include a wider range of teams and
locations could improve the model generalization. We hope the TeamTrack
dataset will contribute to the development of more effective tracking models.

##  6 Acknowledgements

This work was financially supported by JSTSPRING Grant-Number JPMJSP2125 and
JST PRESTO JPMJPR20CA.

## References

  * Alahi et al. [2016] Alexandre Alahi, Kratarth Goel, Vignesh Ramanathan, Alexandre Robicquet, Li Fei-Fei, and Silvio Savarese.  Social lstm: Human trajectory prediction in crowded spaces.  In _Proceedings of the IEEE conference on computer vision and pattern recognition_ , pages 961–971, 2016.
  * Bergmann et al. [2019] Philipp Bergmann, Tim Meinhardt, and Laura Leal-Taixe.  Tracking without bells and whistles.  In _Proceedings of the IEEE/CVF International Conference on Computer Vision_ , pages 941–951, 2019.
  * Brasó and Leal-Taixé [2020] Guillem Brasó and Laura Leal-Taixé.  Learning a neural solver for multiple object tracking.  In _Proceedings of the IEEE/CVF conference on computer vision and pattern recognition_ , pages 6247–6257, 2020.
  * Carion et al. [2020] Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey Zagoruyko.  End-to-end object detection with transformers.  In _Computer Vision–ECCV 2020: 16th European Conference, Glasgow, UK, August 23–28, 2020, Proceedings, Part I 16_ , pages 213–229. Springer, 2020.
  * Cioppa et al. [2022] Anthony Cioppa, Silvio Giancola, Adrien Deliege, Le Kang, Xin Zhou, Zhiyu Cheng, Bernard Ghanem, and Marc Van Droogenbroeck.  Soccernet-tracking: Multiple object tracking dataset and benchmark in soccer videos.  In _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition_ , pages 3491–3502, 2022.
  * Cui et al. [2023] Yutao Cui, Chenkai Zeng, Xiaoyu Zhao, Yichun Yang, Gangshan Wu, and Limin Wang.  Sportsmot: A large multi-object tracking dataset in multiple sports scenes.  _arXiv preprint arXiv:2304.05170_ , 2023.
  * Decroos et al. [2019] Tom Decroos, Lotte Bransen, Jan Van Haaren, and Jesse Davis.  Actions speak louder than goals: Valuing player actions in soccer.  In _KDD_ , pages 1851–1861, 2019.
  * Dendorfer et al. [2020] Patrick Dendorfer, Hamid Rezatofighi, Anton Milan, Javen Shi, Daniel Cremers, Ian Reid, Stefan Roth, Konrad Schindler, and Laura Leal-Taixé.  Mot20: A benchmark for multi object tracking in crowded scenes.  _arXiv preprint arXiv:2003.09003_ , 2020.
  * Duan et al. [2019] Kaiwen Duan, Song Bai, Lingxi Xie, Honggang Qi, Qingming Huang, and Qi Tian.  Centernet: Keypoint triplets for object detection.  In _Proceedings of the IEEE/CVF international conference on computer vision_ , pages 6569–6578, 2019.
  * Feng et al. [2020] Na Feng, Zikai Song, Junqing Yu, Yi-Ping Phoebe Chen, Yizhu Zhao, Yunfeng He, and Tao Guan.  Sset: a dataset for shot segmentation, event detection, player tracking in soccer videos.  _Multimedia Tools and Applications_ , 79:28971–28992, 2020.
  * Figueroa et al. [2006] Pascual J Figueroa, Neucimar J Leite, and Ricardo ML Barros.  Tracking soccer players aiming their kinematical motion analysis.  _Computer Vision and Image Understanding_ , 101(2):122–135, 2006.
  * Geiger et al. [2015] Andreas Geiger, Philip Lenz, Christoph Stiller, and Raquel Urtasun.  The kitti vision benchmark suite.  _URL http://www. cvlibs. net/datasets/kitti_ , 2(5), 2015.
  * He et al. [2016] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun.  Deep residual learning for image recognition.  In _Proceedings of the IEEE conference on computer vision and pattern recognition_ , pages 770–778, 2016.
  * He et al. [2021] Shuting He, Haowen Luo, Pichao Wang, F. Wang, Hao Li, and Wei Jiang.  Transreid: Transformer-based object re-identification.  _2021 IEEE/CVF International Conference on Computer Vision (ICCV)_ , pages 14993–15002, 2021.
  * Hennessy and Jeffreys [2018] Liam Hennessy and Ian Jeffreys.  The current use of gps, its potential, and limitations in soccer.  _Strength & Conditioning Journal_, 40(3):83–94, 2018.
  * Hurault et al. [2020] Samuel Hurault, Coloma Ballester, and Gloria Haro.  Self-supervised small soccer player detection and tracking.  In _Proceedings of the 3rd international workshop on multimedia content analysis in sports_ , pages 9–18, 2020.
  * Iwase and Saito [2004] Sachiko Iwase and Hideo Saito.  Parallel tracking of all soccer players by integrating detected positions in multiple view images.  In _Proceedings of the 17th International Conference on Pattern Recognition, 2004. ICPR 2004._ , pages 751–754. IEEE, 2004.
  * Jocher et al. [2023] Glenn Jocher, Ayush Chaurasia, and Jing Qiu.  YOLO by Ultralytics, 2023.
  * Lin et al. [2017] Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dollár.  Focal loss for dense object detection.  In _Proceedings of the IEEE international conference on computer vision_ , pages 2980–2988, 2017.
  * Loshchilov and Hutter [2017] Ilya Loshchilov and Frank Hutter.  Decoupled weight decay regularization.  _arXiv preprint arXiv:1711.05101_ , 2017.
  * Maglo et al. [2022] Adrien Maglo, Astrid Orcesi, and Quoc-Cuong Pham.  Efficient tracking of team sport players with few game-specific annotations.  In _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition_ , pages 3461–3471, 2022.
  * Manafifard et al. [2017] Mehrtash Manafifard, Hamid Ebadi, and H Abrishami Moghaddam.  A survey on player tracking in soccer videos.  _Computer Vision and Image Understanding_ , 159:19–46, 2017.
  * Meinhardt et al. [2022] Tim Meinhardt, Alexander Kirillov, Laura Leal-Taixe, and Christoph Feichtenhofer.  Trackformer: Multi-object tracking with transformers.  In _Proceedings of the IEEE/CVF conference on computer vision and pattern recognition_ , pages 8844–8854, 2022.
  * Milan et al. [2016] Anton Milan, Laura Leal-Taixé, Ian Reid, Stefan Roth, and Konrad Schindler.  Mot16: A benchmark for multi-object tracking.  _arXiv preprint arXiv:1603.00831_ , 2016.
  * Patino et al. [2016] Luis Patino, Tom Cane, Alain Vallee, and James Ferryman.  Pets 2016: Dataset and challenge.  In _Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops_ , pages 1–8, 2016.
  * Pettersen et al. [2014] Svein Arne Pettersen, Dag Johansen, Håvard Johansen, Vegard Berg-Johansen, Vamsidhar Reddy Gaddam, Asgeir Mortensen, Ragnar Langseth, Carsten Griwodz, Håkon Kvale Stensland, and Pål Halvorsen.  Soccer video and player position dataset.  In _Proceedings of the 5th ACM Multimedia Systems Conference_ , pages 18–23, 2014.
  * Rangesh and Trivedi [2019] Akshay Rangesh and Mohan Manubhai Trivedi.  No blind spots: Full-surround multi-object tracking for autonomous vehicles using cameras and lidars.  _IEEE Transactions on Intelligent Vehicles_ , 4(4):588–599, 2019.
  * Redmon et al. [2016] Joseph Redmon, Santosh Divvala, Ross Girshick, and Ali Farhadi.  You only look once: Unified, real-time object detection.  In _Proceedings of the IEEE conference on computer vision and pattern recognition_ , pages 779–788, 2016.
  * Scott et al. [2022] Atom Scott, Ikuma Uchida, Masaki Onishi, Yoshinari Kameda, Kazuhiro Fukui, and Keisuke Fujii.  Soccertrack: A dataset and tracking algorithm for soccer with fish-eye and drone videos.  In _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition_ , pages 3569–3579, 2022.
  * Shen et al. [2022] Yao Shen, Lei Wang, and Yue Jin.  Aaformer: A multi-modal transformer network for aerial agricultural images.  In _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) Workshops_ , pages 1705–1711, 2022.
  * Spearman [2018] William Spearman.  Beyond expected goals.  In _Proceedings of the 12th MIT sloan sports analytics conference_ , pages 1–17, 2018.
  * Sullivan and Carlsson [2006] Josephine Sullivan and Stefan Carlsson.  Tracking and labelling of interacting multiple targets.  In _European conference on computer vision_ , pages 619–632. Springer, 2006.
  * Sullivan et al. [2009] Josephine Sullivan, Peter Nillius, and Stefan Carlsson.  Multi-target tracking on a large scale: Experiences from football player tracking.  In _Proceedings of the IEEE ICRA 2009 workshop on people detection and tracking_. Citeseer, 2009.
  * Sun et al. [2020] Peize Sun, Jinkun Cao, Yi Jiang, Rufeng Zhang, Enze Xie, Zehuan Yuan, Changhu Wang, and Ping Luo.  Transtrack: Multiple object tracking with transformer.  _arXiv preprint arXiv:2012.15460_ , 2020.
  * Sun et al. [2022] Peize Sun, Jinkun Cao, Yi Jiang, Zehuan Yuan, Song Bai, Kris Kitani, and Ping Luo.  Dancetrack: Multi-object tracking in uniform appearance and diverse motion.  In _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition_ , pages 20993–21002, 2022.
  * Teranishi et al. [2022] Masakiyo Teranishi, Kazushi Tsutsui, Kazuya Takeda, and Keisuke Fujii.  Evaluation of creating scoring opportunities for teammates in soccer via trajectory prediction.  In _International Workshop on Machine Learning and Data Mining for Sports Analytics (MLSA)_. Springer, 2022.
  * Theagarajan et al. [2018] Rajkumar Theagarajan, Federico Pala, Xiu Zhang, and Bir Bhanu.  Soccer: Who has the ball? generating visual analytics and player statistics.  In _Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops_ , pages 1749–1757, 2018.
  * Wang et al. [2022] Jie Wang, Yuzhou Peng, Xiaodong Yang, Ting Wang, and Yanming Zhang.  Sportstrack: An innovative method for tracking athletes in sports scenes.  _arXiv preprint arXiv:2211.07173_ , 2022.
  * Wen et al. [2020] Longyin Wen, Dawei Du, Zhaowei Cai, Zhen Lei, Ming-Ching Chang, Honggang Qi, Jongwoo Lim, Ming-Hsuan Yang, and Siwei Lyu.  Ua-detrac: A new benchmark and protocol for multi-object detection and tracking.  _Computer Vision and Image Understanding_ , 193:102907, 2020.
  * Wojke et al. [2017] Nicolai Wojke, Alex Bewley, and Dietrich Paulus.  Simple online and realtime tracking with a deep association metric.  In _2017 IEEE international conference on image processing (ICIP)_ , pages 3645–3649. IEEE, 2017.
  * Xu et al. [2020] Yihong Xu, Aljosa Osep, Yutong Ban, Radu Horaud, Laura Leal-Taixé, and Xavier Alameda-Pineda.  How to train your deep multi-object tracker.  In _Proceedings of the IEEE/CVF conference on computer vision and pattern recognition_ , pages 6787–6796, 2020.
  * Zeng et al. [2022] Fangao Zeng, Bin Dong, Yuang Zhang, Tiancai Wang, Xiangyu Zhang, and Yichen Wei.  Motr: End-to-end multiple-object tracking with transformer.  In _Computer Vision–ECCV 2022: 17th European Conference, Tel Aviv, Israel, October 23–27, 2022, Proceedings, Part XXVII_ , pages 659–675. Springer, 2022.
  * Zhang et al. [2008] Yi Zhang, Hanqing Lu, and Changsheng Xu.  Collaborate ball and player trajectory extraction in broadcast soccer video.  In _2008 19th International Conference on Pattern Recognition_ , pages 1–4. IEEE, 2008.
  * Zhang et al. [2023] Yuang Zhang, Tiancai Wang, and Xiangyu Zhang.  Motrv2: Bootstrapping end-to-end multi-object tracking by pretrained object detectors.  In _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition_ , pages 22056–22065, 2023.
  * Zhou et al. [2019] Kaiyang Zhou, Yongxin Yang, Andrea Cavallaro, and Tao Xiang.  Omni-scale feature learning for person re-identification.  In _Proceedings of the IEEE/CVF international conference on computer vision_ , pages 3702–3712, 2019.

##  Appendix A Change Log

Version 1 (2024-04-22)

\- Initial arXiv version.