Laser spectroscopy of hot atomic vapours: from ’scope to theoretical fit

The spectroscopy of hot atomic vapours is a hot topic. Many of the work-horse techniques of contemporary atomic physics were first demonstrated in hot vapours. Alkali-metal atomic vapours are ideal media for quantum-optics experiments as they combine: a large resonant optical depth; long coherence times; and well-understood atom–atom interactions. These features aid with the simplicity of both the experimental set up and the theoretical framework. The topic attracts much attention as these systems are ideal for studying both fundamental physics and has numerous applications, especially in sensing electromagnetic fields and quantum technology. This tutorial reviews the necessary theory to understand the Doppler broadened absorption spectroscopy of alkali-metal atoms, and explains the data taking and processing necessary to compare theory and experiment. The aim is to provide a gentle introduction to novice scientists starting their studies of the spectroscopy of thermal vapours while also calling attention to the application of these ideas in the contemporary literature. In addition, the work of expert practitioners in the field is highlighted, explaining the relevance of three extensively-used software packages that complement the presentation herein.

A prominent fraction of the research conducted is with vapours of alkali metals-for reasons explained below-and laser spectroscopy of these atomic ensembles is the subject of this tutorial. Alkali-metal atomic vapours are ideal media for atomic physics experiments as they combine: (i) a large resonant optical depth; (ii) long coherence times; (iii) well-understood atom-atom interactions. These features aid with the simplicity of both the experimental set up and the theoretical framework.
The scope of this tutorial is to present a model that allow us to calculate the absolute susceptibility of the atomic vapour; this enables quantitative predictions in the vicinity of the D lines 3 . The tutorial has two halves: in the first half we review the basics of Doppler-broadened spectroscopy, leading to presentation and a discussion of some exemplar absorption spectra, and then showing the work of expert practitioners in the field; in part II we present experimental methods for data gathering, followed by data analysis, culminating in fitting the experimental spectra to the theory presented in part I. Part I. Generating theoretical spectra for hot atomic vapours

Calculating the absorption coefficient of a Doppler-broadened medium
In this section we shall calculate the absorption profile of a hot atomic vapour. We use the formalism of the electric susceptibility, which relates the strength of the response of a medium to an applied oscillating electric field. The induced dipole moment of an atom subject to an external field is calculated, and we shall relate this microscopic property to the macroscopic properties of a medium of atoms. A formula for the atomic cross section is developed, with the importance of the atomic density stressed. The velocity of the atoms in the vapour is incorporated into the framework, as does the feature that the atoms have multiple resonance frequencies. This will allow us to predict the shape of the spectrum, i.e. the relative linestrengths of the atomic transitions. Finally, we shall show how it is possible to use well-known parameters of the atom in our formalism, allowing us to predict the absolute absorption coefficient as a function of frequency, and hence generate theoretical spectra for hot atomic vapours.

Electric susceptibility
We model our dilute atomic vapour as a dielectric material. The optical response when probed by monochromatic light of angular frequency ω is encapsulated by the electric susceptibility, χ(ω). We shall calculate the response of a single atom subject to a monochromatic field, and then find the field downstream of a slab of randomly distributed atoms. The propagation of light through a cell of length can then be calculated by propagating the field from one slab to a neighbouring one.

Fundamental concepts
The fundamental question we are addressing is the following: what is the field downstream of an atom that is situated in a plane monochromatic laser of angular frequency ω? The field has two components: the original incident wave, and the field radiated by the atom as a consequence of being immersed in the incident field. The radiated field will be a function of the detuning, Δ, where Δ = ω − ω 0 is the difference between the laser's (angular) frequency and the resonance frequency ω 0 . The physics involved in this problem is relatively straightforward-it is that of induced dipoles. The frequency-dependent polarisability, P(Δ), is the constant of proportionality between the induced dipole moment and the incident field. From our knowledge of classical resonator theory, we expect the induced field to be in phase with the driving field for frequencies below resonance, to be π/2 out of phase on resonance, and π out of phase when driving above resonance. The frequency width of the crossover between in and out of phase is characterised by Γ, the width of the resonance. Semi-classical quantum theory [66]-where the atom is treated quantum mechanically, and the light field classically-can be applied to solve exactly for the polarisability of a single two level atom [67], yielding Here, Γ is the radiative decay rate of the excited state and the width of the resonance. The dipole moment of the atom is c m F d, where d is the reduced matrix element and c m F is a coefficient dependent on initial and final states. Details on how to calculate the atom's dipole moment are in section 1.6. To derive this result, a weak field was assumed-such that most of the population remains in the ground state of the atom. As expected, we find a complex polarisability: the radiated field changes both magnitude and phase with respect to the driving field in the vicinity of resonance. Having derived the polarisability of a single atom, we now move on to calculate the optical properties of a medium comprising an ensemble of atoms.

Relating microscopic to macroscopic properties of the medium
For a thin slice of medium with many atoms, with number density N, the results of Fresnel near-field diffraction can be used to sum the total field downstream of the slab [67]. Two important results emerge: (i) the sum of the fields of the individual atomic dipoles has the same functional form as for a single atom, but there is an addition factor of i which represents a phase lag of π/2. As a consequence, the field radiated by the atoms is exactly out of phase with the incident driving field on resonance, causing maximum extinction of the light, and (ii) the field from the sum of dipoles is proportional to the number density of atoms. We formally define the susceptibility as the dimensionless ratio where 0 is the permittivity of free space. The susceptibility is related to the refractive index, n, via the equation n = √ (1 + χ). As atomic vapours are tenuous, the magnitude of the refractive index is much less than one and therefore n ≈ 1 + χ/2. The real part of χ, and hence n, represents the slowing down of light and dispersive properties of the medium; the imaginary part of χ is a measure of the extinction (or absorption) of the light [68].
Assuming that the intensity of the light is not too strong, the extinction of the light as it traverses a medium is encapsulated in the Beer-Lambert equation [67] where I is the intensity of the light after propagating a distance in the medium; I 0 is the incident intensity; and the absorption coefficient α is related to the imaginary part of the susceptibility, χ I , by the relation α = 2πχ I /λ, with λ the wavelength. In an experiment the quantity typically measured is the transmission, T , defined as T = I( )/I 0 . In equation (3) we have also introduced the atomic absorption cross section, σ, which is an alternative way to represent the absorption. Calculating the frequency dependence of the cross section for a vapour of alkali-metal atoms will enable us to predict the absorption spectrum. The product Nσ is known as the optical depth of the medium; high extinction is achieved with media of optical depth greater than one.

Atomic absorption cross section 1.2.1. Radiative broadening
Using the results from the last section allows us to predict the lineshape for the absorption cross section for a stationary two-level atom; it takes the form of a Lorentzian as a function of detuning, given by where σ 0 is the peak absorption cross section [69], and Γ is the rate of spontaneous emission from the excited state. For a two-level atom with pure radiative broadening σ 0 = 3λ 2 0 /2π, where λ 0 is the resonant wavelength [70]. Equation (4) confirms the assertion made earlier that Γ is the width of the resonance. We note that it is possible to include power broadening in this formalism [66]. The Lorentzian lineshape is retained, but with a broader width. High-intensity effects are beyond the scope of this tutorial, and we shall restrict our attention to the weak-excitation regime (see section 1.8).

Number density and cell-length dependence
For many experiments the optical depth is the quantity which best parameterises the atom-light interaction. The desire to fabricate compact devices demands a concomitant increase in the absorption coefficient, realised by increasing the atomic density. The vapour pressure for alkali-metal atoms shows near exponential sensitivity to temperature, see figure 1. One of the strongest motivations for using Rb and Cs as systems for studying atomic physics and quantum optics is their large number density at room temperature, thus it is quite straightforward to achieve large resonant optical depth (see section 1.10). By contrast, most experiments conducted with K and Na vapours use heated cells. For an initial starting temperature T and number density N(T), figure 1 also shows the temperature change ΔT needed to scale N(T) by up to a factor of 10. Therefore, for example, for Rb at room temperature a tripling of the number density is achieved for an increase in temperature of a modest 10 • C. For all the relevant species, an order of magnitude increase in number density can be achieved by an increase of temperature in the range 20 • C-40 • C, depending on the initial temperature and species. See appendix A in [71] for the relevant number density equations used to compute figure 1.
Although cell lengths of 1 m [72] have been used for studying optical pulse propagation in hot vapours 4 , the vast majority of experiments are performed with cells that are between a few mm and up to 10 cm in length; the theory presented in this half of the tutorial is relevant to the experimental results presented in the second half, collected with cells a few cm in length.
For elements with high melting-points achieving high optical depth in vapour cells can be difficult, and hollow cathode lamps are frequently used to generate sufficient atomic density [76][77][78]. Hollow cathode lamps can also be used to generate high alkali-metal atomic density [79,80].
The study of confinement of atoms and light on the micro-and nanoscales is burgeoning, with motivation ranging from fundamental physics [81][82][83]; to miniature vapour-cell atomic-frequency references and devices [55,[84][85][86][87]. Different fabrication techniques for constructing vapour cells for alkali-metal atoms are being developed [88][89][90][91][92]. Particularly noteworthy are the nanometric thin cells developed at the Institute for Physical Research, Armenia; these cells have been used to study a wide range of fundamental physics [93][94][95][96][97][98][99] and have sensing applications [100][101][102][103]. The spectra of atoms confined to thin cells is modified with respect to bulk cells, with interactions of atoms with the walls and cavity effects being dominant. Sub-Doppler resolution can be obtained conveniently with nanometric cells (in contrast to bulk cells where more elaborate solutions are required for comparable resolution, typically realised with pump-probe techniques). The spectral profiles of atoms confined to thin cells are greatly modified, and require more elaborate modelling to explain the transmission profiles [104][105][106]; consequently, a comprehensive review of the spectroscopic studies of nanometric thin cells is beyond the scope of this tutorial 5 .

Pressure broadening
The phenomenon of pressure broadening refers to the shortening of the excited-state lifetime-and concomitant broadening of the spectral width of the resonance-as a consequence of collisions which perturb the emission of radiation by the atoms in the vapour. A modification of Γ is easily incorporated into the cross section via equation (4).
There are two relevant mechanisms of pressure broadening for an alkali-metal vapour: atom-buffer gas collision, and pairs of alkali-metal atoms colliding. Typically an alkali-metal vapour cell has a finite amount of inert buffer gas. One motivation for adding the buffer gas is to slow down atomic diffusion, which can reduce transit-time broadening [108][109][110]. As was emphasised in the introduction, the collisional properties of alkali-metal atoms are very well understood and characterised. The shift and broadening properties of alkali-metal collisions with inert gases have been studied extensively [111].
For alkali-metal atoms it is possible to include dipole-dipole interactions that preserve the Lorentzian lineshape, with a number-density dependent width, Γ N = Γ + βN, where β is the self-broadening coefficient. For the D 1 and D 2 transitions the coefficients β are given by [111,112] Here, Γ 1 (Γ 2 ) and λ 1 (λ 2 ) are the natural linewidth and transition wavelength for the D 1 (D 2 ) transition. The physical interpretation of these results is the following: a pair of alkali-metals with a separation ∼λ/2π will influence each other's radiative properties strongly via the dipole-dipole interaction; for smaller separations the self-broadening term will dominate over the natural linewidth. Excellent agreement between the theoretical predictions and experimental measurements have been found over a wide range of parameters [112][113][114][115][116][117]. Note that as discussed in section 1.2.2 the rapid rise in number density with temperature means that dipole-dipole interactions can evolve from being negligible to the dominant Lorentzian broadening contribution for modest rises in temperature.

Including atomic velocity
Atoms in a vapour in thermal equilibrium have a distribution of velocity components along any particular direction that is a Gaussian [118,119]. The probability that an atom has a z-component of velocity in the range v z to v z + dv z is given by f(v z )dv z , with Here m is the mass of the atom; k B is the Boltzmann constant; T is the temperature of the vapour; and the FWHM of the velocity distribution, u, is [69] u = 2 2 ln 2k B T/m. Consider an atom with velocity component v z along the direction of propagation of the laser beam. As a consequence of the Doppler effect there is a modification of the detuning: Δ → Δ = Δ − kv z , where k is the wave-vector of the incident field. The number density of atoms having a z-component of velocity within the range v z to v z + dv z is n(v z )dv z = Nf(v z )dv z . The range of velocities in equation (7) leads to Doppler broadening of a spectral line.

Voigt lineshape
The absorption lineshape can be calculated by taking into account both homogeneous (Lorentzian) and inhomogeneous (Doppler) broadening. Incorporating the Doppler shift, the cross section of equation (4) is modified thus: Here, the function L is the normalised Lorentzian lineshape. Note that it can be written in terms of a dimensionless velocity (v z in units of the FWHM u), and of a dimensionless detuning (detuning Δ in units of FWHM of the Doppler shift, ku). The absorption coefficient of the vapour is obtained by summing contributions from all the atomic velocity groups: Inserting the Gaussian velocity distribution from equation (7) and the Lorentzian (10) into equation (11) leads to The integral in equation (12) is known as the Voigt profile [120], being the convolution of the Gaussian and Lorentzian functions. Historically, tabulated values of the Voigt function [121] were used because this integral cannot be evaluated analytically. However, efficient computer algorithms now allow the Voigt profile to be calculated quickly; as a consequence, experimental spectra are amenable to least-squares optimisation techniques [122] for parameter extraction. Various examples of Voigt profiles calculated for different but realistic Gaussian and Lorentzian widths for 87 Rb on the D 2 line are plotted in figure 2.
In many experiments the Gaussian width is approximately two orders of magnitude wider than the Lorentzian. In the limit that the Lorentzian can be approximated as a delta-function, it is a well-know mathematical property of convolution integrals that the narrow distribution 'picks out' the broad distribution; in this regime, the Voigt lineshape reverts to the Gaussian in the vicinity of line centre. However, the approximation that the convolution of a broad Gaussian and a narrow Lorentzian can always be reduced to a Gaussian is not universally valid, and this can be particularly important in velocity-selection experiments [123], and when studying slow-light phenomena with hot vapours in the wings of the spectral line [124,125].
It should be noted that the Voigt profile provides an excellent fit to experimentally measured spectra for a wide range of conditions; however, departures from the Voigt lineshape are known and have been studied, and are particularly relevant in the field of Doppler-broadened thermometry [126][127][128][129][130][131][132].

Multiple transitions and their frequencies
So far, we have assumed that there is a single isolated atomic resonance. Alkali-metal atoms have got fine and hyperfine structure, therefore their spectra are more complicated. However, it is easy to modify the theory developed above for the case of multiple transitions. The location of the hyperfine-resolved transitions for the alkali-metal atoms is very well known [133]. The susceptibility is calculated for each transition, with a linestrength as described in the next sub-section. If the ith transition has a detuning of Δ i with respect to the line centre, then the total susceptibility as a function of a given global frequency detuning Δ is simply the sum over all transitions [71]: Zero detuning is typically chosen to be the weighted centre of the line [134].

Relative linestrengths
The strength of the interaction between an atom and near-resonant electromagnetic radiation is encapsulated by the resonant cross section, which is proportional to a quantity known as the dipole matrix element. For a transition between states |F, m F and |F , m F the dipole matrix element is F, m F |er q |F , m F . Here, e is the charge of the electron, and er q is a component of the dipole operator in the spherical basis (see equation (5.17) in [120]). We can factor out the angular dependence and use the so-called reduced matrix element [135]: Here F, I, J, L, S, and m F are the angular momentum quantum numbers; I is the nuclear spin for the particular isotope; S, the electron spin, is 1 2 . Primed variables relate to the excited state. q is associated with different basis vectors of the polarisation of the light field, and determines the change in magnetic quantum number during a transition; the notation used is σ + transitions for the case q ≡ Δm F ≡ m F − m F = 1, σ − transitions when Δm F = −1, and π transitions for Δm F = 0. Using the notation introduced by Wigner this formula contains so-called 3 − j and 6 − j symbols. The 3 − j symbol is the term contained in the large round brackets, and the 6 − j in curly brackets. L er L is the reduced matrix element, and can be expressed in terms of the wavelength of the transition, λ, and the decay rate of the excited state, Γ. By calculating the Wigner coefficients and prefactors, equation (14) reduces to Each individual transition has a dipole moment that is the product of the coefficient c m F that is dependent on the initial and final states, and the linestrength is proportional to the square of the transition matrix element, c 2 m F d 2 . Historically, look-up tables were used to evaluate the relevant terms in equation (14) to calculate the coefficients in equation (15); nowadays there exist numerous computer packages, often with graphical user interfaces (GUIs), to calculate the coefficients. There is not much physical insight to be gained by studying equation (14), with the subtleties of the atom-light interactions and the role of the polarisation of the light being obfuscated by the notation. In appendix A we provide a different approach to calculating relative linestrengths, by explicitly performing the decoupling of angular momentum in the uncoupled basis; more physical insight is gleaned form this alternative method of calculation (at the expense of the calculations taking longer) 6 .

Absolute absorption coefficient
The absolute value of the reduced matrix element, d, can be calculated using the expression for the excited state decay rate [68,134] The reduced matrix element with J as the relevant quantum number J er J can be written in terms of another reduced matrix element with L as the quantum number: To obtain a value from experimental measurements, equation (17) can be evaluated. For example, for the D 2 line we obtain Substituting (18) into (16) and rearranging, Tables B.4 and B.5 in [71], for example, list the wavelength and natural linewidth for the D 1 and D 2 transitions, respectively, for the alkali metals Na, K, Rb and Cs. Using equation (19) for the absolute matrix element, and equation (15) for the relative linestrengths allows us to calculate the absorption spectrum for all of the components in both D 1 and D 2 transitions using the total susceptibility of equation (13).

Weak-probe limit (and beyond)
The theoretical treatment presented above assumes that we are in the weak-probe limit, such that the presence of the light does not cause significant population redistribution. For each atomic transition there is a so-called saturation intensity, I SAT [70]. For a stationary atom in a beam with that intensity a quarter of the population would be promoted into the excited state. Therefore, conventionally, the inequality I < I SAT defines the weak-probe limit. However, for spectroscopy with alkali-metal atoms the situation is more subtle than for the simple two-level atom approach. The new phenomenon that has to be taken into account is optical (or hyperfine) pumping; an atom excited on the principal resonance D 1 and four of the six dipole allowed transitions of the D 2 line 7 can either de-excite by returning to the original F state in the 2 S 1/2 term, or can fall into the other F state-this is the process of hyperfine pumping. As the latter is a few GHz off resonance with transitions from the former, these atoms are removed from the system, and diminish the atom-light interaction. A more stringent requirement for the laser intensity is therefore obtained, specifically that the probability of hyperfine pumping to occur when the atom is in the laser beam has to be much smaller than 1. For typical beam widths used in experiments, this can lead to intensities of the order of I 10 −3 I SAT being necessary to gain access to the weak-probe regime [136,137].
A model that works beyond the weak-probe limit should therefore take into account both the width of the laser beam, and the beam shape, in order to take into account the spatially varying intensity [138][139][140][141][142]. Power-dependent corrections to the Voigt lineshape have been introduced [143][144][145]. Progress has also been made in developing theoretical models incorporating spatially dependent absorption in a thermal vapour of arbitrary optical thickness [146][147][148][149][150].
Note that all of the experimental results presented in the second half of this tutorial were obtained in the weak-probe limit.

Adding an external magnetic field
There are many ways to calculate the Zeeman shift on alkali-metal atomic spectra; i.e. the modification induced by an external magnetic field. Broadly the approaches divide into two camps: (i) finding analytic results relevant within some constraints and approximations; and (ii) adding a Zeeman term to the atomic Hamiltonian, and using numerical techniques for matrix diagonalisation to obtain the eigenenergies and frequencies. An example of the latter is the open-source code ElecSus [71,151] which uses the uncoupled basis and populates the Hamiltonian matrix with the hyperfine structure and Zeeman interaction. Examples of using the uncoupled basis for calculating atom-light interaction are provided in appendix A. An excellent overview of the analytic results for certain regimes is provided by Bransden and Joachain [152]. Briefly, weak fields are defined such that the Zeeman interaction is weaker than all hyperfine ones. In this regime (F, m F ) are good quantum numbers in ground 2 S 1/2 and excited 2 P 1/2,3/2 terms; there are simple analytic formulae for shifts of energy levels, linearly proportional to the magnetic field strength, B; consequently it is easy to calculate the Zeeman shift of the transition. Magnetometry with these magnitudes of fields is typically done by measuring the Larmor precession frequency [29,153]. Alkali-metal atoms are ideal for these devices because: it is easy to optically pump the sample, producing large signals; there are well understood interactions among the alkali atoms and buffer gases; the large number density of Cs and Rb in particular means that room-temperature operation is feasible. For modest fields: (F, m F ) are still good quantum numbers for the ground state, but it is better to use m J and m I in the excited state. This regime is achieved when the Zeeman interaction is comparable to the excited state hyperfine interaction. It is more awkward to find analytic results in this regime owing to the difference in suitable quantum numbers. In the hyperfine Paschen Back (HPB) regime the analysis becomes simpler again, with simple analytic results for transition shifts. Access is gained to the HPB regime when the Zeeman shift exceeds the ground state hyperfine interaction. A convenient way to visualise this is via the Breit-Rabi diagram [154,155] which encapsulates the (non-linear) evolution of the energy level energies as a function of applied magnetic field. An estimate of the field needed is B HPB = A hf /μ B , where A hf is the magnetic dipole constant for the ground term, and μ B is the Bohr magneton 8 . For the heavier alkali-metal atoms in the HPB regime the separation of the lines from the Zeeman interaction also exceeds the Doppler width, therefore clean isolated atomic resonances are observed. Numerous experimental studies have been performed in the HPB regime [157][158][159][160][161][162][163][164][165][166][167][168][169][170]; in contrast to the experiments at lower fields the Larmor precession frequency is too high for conventional electronic systems, and obtaining the absorption spectrum of the atoms is a more direct way of measuring the magnetic field. Spectroscopic studies of the Zeeman splitting with alkali-metal atoms has been used to observe field strengths of the order of tens/hundreds of Tesla [171][172][173]. With the development of non-destructive techniques for producing such large fields, spectroscopy in pulsed magnetic fields up to 58 T has been performed with alkali-metal atomic vapour sensors [174,175]. It is noteworthy that in a large magnetic field a great simplification of the energy levels occurs in the HPB regime. This allows for the generation of ideal two-, three-and four-level systems, with concomitant clean spectra, with minimal line overlap. Also, the greatly simplified internal level structure facilitates the theoretical modelling of the system. For example, experiments conducted in atomic Rb subject to a strong magnetic field of 0.6 T generated with permanent magnets allowed for the textbook demonstration of V-EIT [176]; ladder-EIT [177]; electromagnetically induced absorption [178]; four-wave mixing [32]; and heralded single-photon generation [179]. The increased application of alkali-metal atom spectroscopy in fields of the order of a Tesla has motivated studies of generating large magnetic fields that are uniform over the vapour cell [180,181].
For the Paschen-Back regime [152,155] to be achieved the magnetic field must be sufficiently large to be comparable to the fine structure splitting between the 2 P 1/2 and 2 P 3/2 terms. Some studies with Na at 50 T were reported [182], but there is a dearth of measurements with the heavier alkali-metal atoms because of the prohibitively large value of the magnetic field needed [31].

Stokes parameters
The main thrust of this tutorial is to explain the form of the Doppler-broadened absorption spectrum for alkali-metal atoms. To this end we developed a model to that allowed us to calculate the complex susceptibility of the medium, and used the imaginary part to calculate the extinction of light as it traverses the cell. This model also allows us to calculate the real part of the susceptibility, and hence refractive index.
This tells us about the phase a plane wave picks up on traversing the cell. When a magnetic field is applied the medium has two distinct eigenmodes, each of which picks up a different phase. This can lead to an evolution of the polarisation of the light as it passes through the cell. For the absorption spectrum a single detector after the cell is used to measure the transmission spectrum (see details in part II of this tutorial); it is possible to add a second detector, and a polarising beamsplitter (PSB). The polarisation state of the transmitted light can be characterised by pairs of measurements of the intensity in different sets of orthogonal polarisation bases; these are processed to calculate the Stokes parameters [183][184][185]. Of most importance to this tutorial is the Stokes parameter S 0 , which is equal to T , see section 1.1.2. As the evolution of the polarisation state of the light as it traverses the cell depends both on the real and imaginary components of the susceptibility, measuring the Stokes parameters provides a stringent test of the theoretical model and has been tested with cw [169,186,187] and pulsed light propagation [125] in hot atomic vapours.

Faraday, Voigt and unconstrained geometries
The spectrum of the light transmitted through a vapour cell subject to an external magnetic field is dependent on the relative orientation of the field and the k-vector of the light. There are two special geometric cases, named the Faraday [188] and Voigt [189] effect; these are defined as when the magnetic field is parallel or perpendicular to the light propagation axis (the k-vector), respectively. For these cases the wave equation for propagation has simple solutions with well defined eigenstates of polarisation. The Faraday geometry is used frequently, not least because of its utility in constructing optical isolators (OIs)-devices that allow light to propagate only in one direction [190,191]. There are many studies of the Voigt effect in atomic vapours [168,169,[192][193][194]. The general case with arbitrary angle between the magnetic field and the axis of propagation is more difficult to treat mathematically, and there are far fewer experimental studies of this case [195,196]. Nevertheless, there has been a recent burgeoning of interest in this geometry, as it offers the perspective of realising better atomic line filters [63,65], as discussed in the next section.

Narrowband atomic line filters
Using a theoretical understanding of the magneto-optical properties of alkali-metal atom hot vapours allows narrowband line filters to be realised. The idea is to place a vapour cell between crossed polarisers; unless there is optical rotation of the plane of polarisation there will be no transmission. Optical rotation arises as a difference in the speed of light for the left and right-hand circularly polarised light components in the medium, induced (typically) by an axial magnetic field (the Faraday geometry). Understanding the interplay between optical rotation (the real part of the atomic susceptibility) and the light absorption (imaginary component of the susceptibility) allows for ultra narrow atomic filters to be designed and constructed. There are numerous examples in solar physics [197], with the pioneering work of Cimino and co-workers [198,199] being noteworthy. Different filters were constructed when it was realised that the anomalous dispersion of Faraday rotation near optical resonance lines can be exploited to build extremely narrowband filters [200]. Dick and Shay [201] demonstrated the operation of a narrow-bandwidth optical filter, the Faraday anomalous dispersion optical filter, that directly transmits light in the vicinity of an atomic resonance. Magneto-optic filters find great utility in a large variety of applications that require isolating a signal frequency from unwanted background radiation. The most frequently used filters employ alkali metals, as these have favourable properties, including (see e.g. [134]): (i) strong principal resonance lines in the visible or near infrared part of the electromagnetic spectrum [112,202,203], (ii) simple and well-understood atomic structure and interactions with fields [65,204], and (iii) the vapour pressure of these elements allow large resonant optical rotations at modest temperatures [205]. Atomic line filters have been demonstrated in different atomic species, including Cs [61,206], Rb [201,207,208], Na [60,209] and K [210]. Gerhardt [211] provides a comprehensive list of different Faraday filters realised with alkali metals, and discusses the role of anomalous dispersion in the generation of the transmission profile. By relaxing the constraint that the magnetic field in the atomic medium and the direction of propagation of the light are parallel, it is possible to produce generalised magneto-optical transmission filters [63], allowing more flexibility in tailoring the spectroscopic transmission profile [65,212].

Exemplar atomic absorption spectra
We finish this section by bringing together all of the ingredients presented above, and plot theoretical Doppler-broadened transmission spectra for alkali-metal atoms. We expect Voigt profile absorption for each 2 S 1/2 F → 2 P 3/2 F transition, with the number of lines governed by the selection rule ΔF = ±1, 0; for D 1 there are four transitions: F = I + 1/2 → F = I ± 1/2, F = I − 1/2 → F = I ± 1/2; for D 2 there are six transitions, the same four as D 1 , and an additional two: What is not as obvious is the expected number of isolated lines, as there will be spectral overlap.
In table 1 we list the ground state hyperfine splitting; the excited state hyperfine splitting for both D 2 and D 1 transitions, and the Doppler widths for both transitions. For 39 K the ground-state and excited state splitting is smaller than the Doppler width; therefore both D 2 and D 1 transitions appear as single compound lines, comprised of six and four individual transitions, respectively. For all of the other atoms the ground-state hyperfine splitting exceeds the Doppler width, and discrete lines are expected for transitions from the upper (F = I + 1/2 → F ) and lower (F = I − 1/2 → F ) hyperfine states in the 2 S 1/2 term. For 85 Rb, 87 Rb, Cs and Na on the D 2 transition the Doppler width exceeds the excited state hyperfine interval, therefore the three transitions F → F = F, F ± 1, overlap. For the D 1 transition the Doppler width exceeds the excited state hyperfine interval for Na and 85 Rb therefore the two transitions overlap; by contrast, for D 1 transition in 87 Rb and Cs the excited state hyperfine interval exceeds the Doppler width, and the two transitions are resolved.
All of the salient points from the previous paragraph are evident in figure 3. Here we plot the theoretical Doppler-broadened transmission spectra for naturally abundant Rb, Na, naturally abundant K (as it is 93.3% 39 K, only the transitions and quantum numbers for the dominant isotope are shown) and Cs. The assumption is that the cell length is 75 mm, and the temperature (that appears in the top right-hand corner of each spectrum) has been chosen to obtain a minimum transmission of 50%. As we predicted in section 1.2.2, Rb and Cs exhibit large vapour pressure at room temperature, therefore substantial absorption is achieved for modest temperatures; Na and K require more heating to generate adequate number density.

Analysis with theoretical models
We emphasised at the beginning of this tutorial that the scope of the article was to provide a gentle introduction to novice scientists starting their studies of the spectroscopy of thermal vapours. At the end of this first half we hope that the reader will have an understanding of the key concepts of Doppler-broadened absorption spectroscopy, and will pick up some experimental and data-processing techniques in the second half. We finish this half by showing the work of expert practitioners in the field, by highlighting three freely-available software packages than can be used to (i) complement the discussion above, and (ii) provide useful tools and ideas for further analysis.

Wolfram demonstrations project
The Wolfram [232] demonstrations project 'Spectra of the D-Lines of Alkali Vapours' developed by Gianni Di Domenico and Antoine Weis is available here: [233]. A screen shot can be seen in figure 4. A GUI allows the user to select isotope, transition (D 2 or D 1 ), temperature and cell length, and whether to plot the transmission spectrum (as is shown in the figure), or the absorption coefficients. The relevant energy levels for the lines n 2 S 1/2 → n 2 P 1/2 and n 2 S 1/2 → n 2 P 3/2 , along with the dipole-allowed F → F transitions are depicted. The calculation assumes pure Doppler broadening of the lines and a weak probe such that the Beer-Lambert law is valid. The absolute absorption coefficients are calculated, incorporating the atomic vapour pressure. A related project calculates, and allows visualisation of, the vapour pressure and density of the alkali-metal atoms [234].

ElecSus
The ElecSus package was developed at Durham, and is available here: [235]. There are also two papers explaining how the code works [71,151]. A screen shot can be seen in figure 5. The Python code calculates the electric susceptibility for alkali-metal atoms, with or without an external magnetic field. The code uses the uncoupled basis (see appendix A) to construct the atomic Hamiltonian, and incorporates the Zeeman interaction. Numerical diagonalisation techniques are used to find the strength and frequency of transitions on the D 1 and D 2 lines 9 . Voigt lineshapes are calculated for each transition, and the total electric susceptibility at any given detuning is obtained by summing over all allowed transitions. The real part of the susceptibility allows the refractive index to be plotted, the imaginary part the transmission spectrum, and both components are used to calculate the Stokes parameters (see section 1.9.1). Similar to 'Spectra of the D-Lines of Alkali Vapours', ElecSus has a GUI that allows the user to specify: species; D line; temperature; length of cell; strength and orientation of the magnetic field; the polarisation state of the input light. In addition, ElecSus allows the user to input experimental data, and to perform least-squares fits to extract optimised parameters; more details on how to do this are to be found in part II of this tutorial, specifically section 4.

ADM: atomic density matrix
The atomic density matrix (ADM) package can be found here: [236]. It is a Mathematica [232] package that 'facilitates analytic and numerical density-matrix calculations in atomic and related systems. It is intended to be both general and user-friendly, and to be useful to the working physicist as well as to students'. A screen shot can be seen in figure 6. ADM is a very sophisticated package than can calculate, and visualise, the results of many problems in contemporary atom-light interactions; there is substantial documentation for installing and using the package, and more than two dozen tutorials are provided to exemplify the types of question that ADM can help analyse. The tutorial 'Linear Absorption Fitting' [237] is of particular relevance to the content of the work presented herein.

Part II. Experimental methods and data analysis
In the laboratory, we acquire atomic spectra using an oscilloscope, which displays the data as an electronic signal (voltage) measured over the period for which the laser frequency is scanned (time). In order to fit the experimental data to the theoretical model (as described in section 2), the experimental spectra need to be calibrated such that we have normalised transmission as a function of linear detuning 10 . We can use the experimental set-up shown in figure 7 for data calibration and for fitting experimental data to theory. The calibration procedure addresses three problems we have with the raw data. First, the calibration begins by converting the time axis into a frequency axis using a Fabry-Pérot etalon (shown in figure 7(ai)). The etalon transmission peaks (figure 7(bi)) can also be used to remove non-linearities from the laser scan. Second, the procedure removes optical power variations that can arise during the laser scan, and normalises the transmission to be between 0 and 1. Third, we use pump-probe Doppler-free spectroscopy (figure 7(aiii)) to provide an absolute frequency reference (figure 7(biii)) in order to define where 'zero' detuning lies within the trace. Depending on the investigation, other effects can arise, such as etaloning in the vapour cell [127,145], that need to be addressed. This is beyond the scope of this tutorial, however a correction procedure for removing unwanted etalons has been provided in appendix B should the reader be interested.
The Doppler-broadened spectra (figure 7(bii)), once calibrated, are used to fit to the theoretical model. The optical power in the vapour cells are set such that we are operating in the weak probe regime (a requirement of the theoretical model, see section 1.8) which depends on the waist size of the interrogating laser beam [238]. The measured spectra are recorded on conventional photodiodes (PDs) and all of the signals are recorded simultaneously on the oscilloscope. The raw outputs for the three PDs are shown in figure 7(b). Note that the PD voltage displayed is dependent on the optical power of the laser, incident laser wavelength and the type of PD and circuit.
In the remaining sections, we discuss how we fix these three problems and the data processing involved in doing so.

Data processing
The entire processing, normalisation and fitting routines have been written in a 'scope-to-theory' Jupyter notebook (see GitHub repository [239]) with commented text and example data. Data in this tutorial have been taken with a PD and oscilloscope, and saved as a .csv file, but this data processing method also applies to experiments that may require a photon counter too [240].

Linearising the laser scan
Upon collecting and saving the data, the first step is to remove non-linearities in the laser scan. To do this, we require an accurate time-to-frequency calibration, which is done using the transmission peaks through the Fabry-Pérot etalon. A Fabry-Pérot etalon consists of two highly reflective mirrors that are placed parallel to one another, separated by a distance L. The frequency difference between two adjacent etalon peaks is known as the free spectral range (ν FSR ). For a confocal etalon, ν FSR = c/4L, where c is the speed of light [241]. For a cavity of length 10 cm, which is used in figure 7(ai), the typical ν FSR is 750 MHz. The measured etalon peaks should be equally spaced if the response to the voltage applied to the piezoelectric transducer in the external cavity of the laser was linear. Figure 7(bi) shows the raw data of the etalon transmission signal for a typical experiment. Figure 8 illustrates the methodology of the linearising python subroutine. By measuring the time difference between etalon peaks, we can compare this to the ν FSR of the etalon. A python subroutine normalises the etalon transmission peaks, selects all of the peaks in the etalon trace and lists them in their ordered positions. Only data points with signal values above a threshold level and greater than an expected peak separation are retained. Figure 8(a) shows the normalised etalon transmission as a function of time. The transmission has been normalised by dividing through by the maximum transmission, making the peak-finder subroutine independent on PD circuit gain and incident laser power. The subroutine has found 14 peaks in the trace, which are labelled in the figure, and has stored the ordered position (in time) for each peak. In figure 8(b) the corresponding peak time as a function of the peak number is shown. With the position of the peaks determined, a linear relation between peak positions and peak numbers is determined via a least-squares fit using the scipy.optimize Python module, which represents linear time to frequency conversion. From the linear fit to the peak position, we can see that the scan has a very small non-linear contribution. It is this non-linearity that we want to remove from the scan. In figure 8(d) we plot the difference from a linear fit as a function of the exact peak position. Using the lmfit package [242,243], a high-order ( 5) polynomial is fit to the difference using a differential evolution (DE) algorithm, followed by a least-squares minimisation in order to determine the uncertainties. The resulting curve is used to convert the original time axis in figure 8(a) to a linearised time axis by evaluating the polynomial at the time corresponding to each data point and subtracting the resulting correction from the data's original time value-we are essentially 'stretching' or 'compressing' the horizontal axis appropriately such that we now have a linear relationship between the time axis and frequency.
The linearised time axis can be converted to a relative frequency axis using the known ν FSR of the Fabry-Pérot etalon and the fixed separation between adjacent etalon peaks. This is shown in figure 8(c). The separation between each adjacent etalon peak is constant and equivalent to the ν FSR of the etalon. To change this to an absolute frequency axis, or linear detuning, an atomic reference is required (see figure 7(aiii) for pump-probe spectroscopy). This is discussed further in section 3.3.

Normalising the PD output
To compare the transmission spectra with a theoretical curve, the PD output data need to be normalised between 0 and 1. There are two steps in this procedure; first we must define what '0' is (i.e. maximum absorption) and second we must define what '1' is (i.e. maximum transmission).
There are a number of reasons why we never measure a PD output of zero (i.e. we always measure a non-negligible output even when there is no laser light incident on the detector), some of which are PD current noise, stray light or amplified spontaneous emission from the laser itself [244]. To define zero we must remove the non-zero PD offset from the spectra; we make the atomic vapour optically thick by heating the vapour cell, such that no resonant laser light can traverse the medium (as discussed in section 1.2.2). Figure 9(a) is a Doppler-broadened absorption spectrum from a heated vapour cell (in fact the same vapour cell used in figure 7(aii)). As indicated by the black dashed line, there is clearly an offset that needs to be removed. The offset is non-constant due to optical power fluctuations of the scanning laser-this is more evident when defining maximum transmission as we shall later see-thus we refer to this as the 'frequency-dependent offset'. We remove the frequency-dependent offset by selecting all of the regions where there is maximum absorption (i.e. the parts of the spectra that lie on the black dashed line). This is implemented interactively (using the Python function ginput), such that the user selects the regions of the spectrum graphically, significantly reducing post-processing time for any given dataset. The selected areas are fitted to a polynomial function and this function is used as the T = 0 line. All datasets using the same photodetector, laser power and vapour cell, including the spectra shown in figure 7(bii), have this polynomial function subtracted from the PD output data. Note that since there are two PDs used for the Doppler-broadened set up and sub-Doppler broadened set up, each detector needs to have the zero-offset calibrated independently. Now we must define the maximum transmission through the atomic vapour. As previously discussed, we need to eradicate laser power fluctuations. These fluctuations arise due to feed-forward in most modern laser electronics; when the voltage to the piezo controlling the fine position of the grating is scanned, the current is also modified, with the aim of increasing the mode-hop free tuning range. The result is an asymmetric signal on the PD, which is clearly visible in figures 7(bii) and (biii), as the output power changes with the frequency of the laser. To correct for this, we interactively select the areas of the spectrum that are known to have no absorption on both the sub-Doppler trace and the Doppler trace, and fit a polynomial function. This is shown in figure 9(b) by the black, dashed line on the Doppler spectra, and this function is used as the T = 1 line. By dividing the data by this function, we define maximum transmission.

Absolute frequency calibration
The next step is to centre the frequency axis, which is done using the sub-Doppler reference spectrum (see figure 7(biii)). Spectra that resolve hyperfine structure are ideal frequency markers for locking lasers to a specific frequency [136]. A modification is seen in the absorption spectrum when the pump and probe beam interact with the atoms centred around zero velocity. When the laser beam is tuned to within the natural linewidth of an atomic resonance, the probe beam detects a shortage of atoms. This is because some of the  87 Rb F = 2, (ii) 85 Rb F = 3, (iii) 85 Rb F = 2 and (iv) 87 Rb F = 1. The vertical black dashed lines are markers for the sub-Doppler features. From left to right, F → F = F − 1, X (F−1,F) , F, X (F−1,F+1) , X (F,F+1) , F + 1, where X denotes a crossover feature. A triangular smooth of weight 100 points for (i) to (iii) and 70 points for (iv) have been applied to the data in the insets. It is not possible to resolve individual features in the sub-Doppler spectrum of 85 Rb F = 2, as the excited state hyperfine intervals are smallest for these transitions. (b) Expected linear detuning values as a function of the frequency with arbitrary offset (black crosses). A linear fit (gold solid line) allows one to convert the relative frequency axis to an absolute frequency axis. atoms have been excited by the pump beam and reside either in the excited state or have been hyperfine pumped (see section 1.8) into the other ground state. Hence, pump-probe spectroscopy gives sub-Doppler resolution: a narrow feature centred at ω 0 within a Doppler broadened absorption spectrum.
For naturally abundant Rb with two isotopes, the electric-dipole selection rules predict that there should be eight and twelve sub-Doppler features visible for the D 1 and D 2 lines, respectively. However, twelve and twenty-four peaks are visible in total. Half of these features correspond to the resonant frequencies F → F = F, F ± 1, where both probe and pump beams excite atoms with close to zero velocity. In addition to these resonant lines, there are four and twelve crossover features [70] that occur at frequencies halfway between each pair of transitions. Figure 10(a) illustrates a normalised sub-Doppler spectrum for the D 2 line in Rb. Inset are the sub-Doppler features corresponding to (i) 87 Rb F = 2, (ii) 85 Rb F = 3, (iii) 85 Rb F = 2 and (iv) 87 Rb F = 1. A triangular smooth of weight 100 points for (i) to (iii) and 70 points for (iv) have been applied to the data in the insets. As explained in section 3.1, the raw time data of the sub-Doppler spectrum has been linearised and converted to a relative frequency axis using the ν FSR of the Fabry-Pérot etalon. Using the sub-Doppler features, we can convert the relative frequency axis to an absolute frequency axis, or rather a linear detuning, which is necessary for fitting a theoretical curve.
Zero detuning is typically chosen to be the weighted centre of the line [134] (as discussed in section 1.5) and is compatible with fitting to ElecSus. As such, the transition frequencies in the 'scope-to-theory' Jupyter notebook [239] are stated with respect to the weighted line centre. Since the crossover resonances are often more intense than the normal resonant transitions [136], it is best to use these to calibrate the frequency axis. Now that the frequency axis is linear, we only require two points to fully calibrate the frequency axis. Any points of the known frequency will do but in this worked example, for the D 2 line, we use the F = 2 → F = 2, 3 and F = 3 → F = 3, 4 crossover resonances in 87 Rb and 85 Rb, respectively, as these are the strongest features. Figure 10(b) shows the absolute frequency of the individual sub-Doppler features against our arbitrarily defined frequency axis. By fitting a linear function to the data, we extract the slope and intercept of the fit. The slope should be equal to one, as we have already corrected for any non-linearities in the laser scan (see section 3.1), whereas the intercept tells us the amount we should translate the frequency axis by in order to set zero detuning appropriately. For example, the linear fit in figure 10(b) has a y-intercept of −4.2 GHz hence the data shown in figure 10(a) needs to shift to the left by 4.2 GHz. The uncertainties in the frequency calibration process are discussed in appendix C, but typically the error in our frequency calibration over this linear detuning range is less than 1% [245].
The method described in this section is also applicable in other atomic species, though the transition frequencies with respect to the weighted line centre will have to be defined by the user in the 'scope-to-theory' Jupyter notebook [239], as only the Rb transitions are defined herein.

Fitting the experimental spectra to theory
With the data processing complete, the experimental spectra can be fitted to theory. In this example, we will demonstrate how we extract parameters of our thermal vapour (including but not limited to broadening, shifts, atom temperature or magnetic field) using ElecSus [71,151], one of the packages discussed in section 2, that is obtained from [235].
The frequency-calibrated experimental data are introduced into the ElecSus GUI via the 'Import Data' tab. The data needs to be in .csv format with two columns of values; the first column specifies the linear detuning (in GHz) while the second column gives the spectrum data. The processing of the data into this format has been carried out in section 3.
The raw data that we obtain from the oscilloscope contains 200 000 data points, as shown in figure 7(b), and, subsequently, this is the number of data points we import into ElecSus. This is typical of fairly basic oscilloscopes used today, and in some (more expensive) versions, the number of data points can exceed tens of millions. When fitting using ElecSus the main limiting factor time-wise is the speed of the iterations over all of the data points, so to reduce the computational time we bin the data. Binning data is a method by which we average over every N DP data points. By measuring the standard deviation σ DP , of these N DP data points, we can also extract a standard error, α DP , such that: This has the advantage of increasing the speed of the fitting algorithm, while also providing an error that can be used to extract errors in the fit parameters. There is a trade-off with the bin size used however; a large bin size reduces the number of data points, meaning the fits can be performed much faster, but at the expense of lowering the spectral resolution. In the 'Fit' menu in the ElecSus GUI there is a 'Data Processing' tab that gives you the option to 'smooth' or 'bin' your data. In this worked example we chose to use a bin size of 250 for all of the Doppler-broadened spectra, leaving 800 data points to be used in the fitting.
Fitting theory to the experimental data involves defining a 'cost' function. The 'cost' is often defined as the square of the difference between theory and experiment summed at each point along the curve [122] and the cost function is minimised by changing the parameters that define the theory curve. Under the 'Fit Settings' tab in the ElecSus GUI, the experimental parameters are introduced as the initial parameters for the calculations, and a fitting routine is chosen. Note the speed of the algorithm is fastest, and the likelihood of finding the global minimum increased, with good initial input parameters.
The fits carried out with ElecSus, through use of the lmfit Python package, allow for multi-parameter fits where individual parameters can be fixed or bound to vary within range values [151]. There are four different fitting routines included in ElecSus that can be used and should be selected depending on the complexity of the fitting problem. In simple cases the option of fitting via the Marquardt-Levenberg (ML) method [122] should be chosen. This method is a 'hill-climbing' algorithm that will quickly find the local minimum (or maximum). The standard errors, which were calculated when the data was binned, are used to weight the residuals in order to get a χ 2 fit. The lmfit package returns the optimised parameters together with their uncertainties in the form of a covariance or error matrix. The elements of the covariance matrix D Pizzey et al Figure 11. ElecSus GUI screen shot displaying theoretical fit (purple line) to experimental data (gold), with residuals underneath. The ML method was used to find the optimised parameters, with the fit settings displayed on the right-hand side. quantify the statistical errors on the optimised parameters. The uncertainty in the ith parameter is given by the square root of the ith diagonal element of the error matrix, whereas the off-diagonal elements define the correlations between the parameters [122]. Figure 11 is a screenshot of the ElecSus GUI with the calibrated Rb absorption spectra (raw data shown in figure 7(bii)) imported and fitted to theory, with the residuals of the fit displayed underneath. The ML routine has been used to fit to the data in figure 11, with atomic vapour temperature as the sole fit parameter. ElecSus provides fitting information, including RMS error between theory and experiment, in addition to the optimised fitting parameters, as shown in figure 12. This information can be saved and the best-curve fit data can be exported in .csv format. The temperature, and its associated error, for this data set was found to be (19.67 ± 0.01) • C. The errors produced by ElecSus are correct, however these are an underestimate of the true uncertainties of the fit parameters, as will be discussed further in section 4.1. Figure 13 shows three experimental transmission spectra, where data have been taken in the same atomic vapour cell, of length 75 mm, but at different temperatures. The spectra were fit using the ML method, with temperature as the sole fit parameter. The atomic vapour temperatures were found to be (19.67 ± 0.01) • C When dealing with many fit parameters, e.g. in searching for ultra-narrow filters [65,208], the ML technique tends to fail to find the global minimum, therefore a global fitting routine should be used. There are three global fitting routines available on ElecSus: random-restart [246]; simulated annealing [247]; and DE [248,249]. Specific details on these algorithms, their operation and advantage can be found on the documentation pages for lmfit [242,243].

Extracting uncertainties in the fit parameters
To extract the statistical uncertainty in the fit parameters, the uncertainty of the data points, which will vary between different experiments, need to be known. The current version of the ElecSus GUI has no facility to accept these uncertainties as an input and so does not provide uncertainties in the fit parameters. However, since ElecSus outputs the theoretical curve as a .csv file, the user can perform this analysis manually (see [122]).
Another method to extract the statistical uncertainty in the fit parameters is to accumulate multiple data sets under nominally the same experimental conditions and fit them independently. This gives several values for each fit parameter from which the mean and standard error of each parameter can be found from this set of values. Although we have not taken repeated data sets in this worked example, using this method we have found that our experimental technique typically gives statistical uncertainties of ≈ 0.1 • C for temperature [245] and ≈1 G for magnetic fields [164] (for magnetic fields up to 5 kG).

Concluding remarks
Spectroscopy of thermal atomic vapours is attracting attention as ideal systems for studying fundamental physics and for use in numerous applications, particularly in the arena of quantum technology and sensing electromagnetic fields. As such, it is important to have an appreciation, and an understanding, of the underlying atomic physics involved in such experiments. Our aim in this tutorial has been to provide a gentle introduction to novice scientists starting their studies of the spectroscopy of thermal atomic vapours. In summary, we have presented the necessary theory to understand the Doppler broadened absorption spectroscopy of alkali-metal atoms, and have explained the data taking and processing required to compare theory and experiment. We have provided a data-analysis notebook with example spectroscopy data, as well as a step-by-step guide to process the experimental data. In the exciting and emerging world of quantum technologies, clearly being able to characterise the medium is vital. We have demonstrated in this work that we can extract parameters such as the temperature, number density, gas composition and magnetic field (to name just a few) from the atomic vapour cell using Doppler-broadened absorption spectra. Note the conservation of z component of angular momentum in the components on the right-hand side of these equations. The next step is a decoupling of J into L + S; i.e. a complete decoupling of F into I, L and S. We use equation (A.1) again with different angular momenta. There is another stretched state whose decomposition is trivial; using the notation |J, m J = L, m L ; S, m S |J, m J |L, m L ; S, m S , we can write (Note that the last vector |1/2, 1/2 can also be written as |↑ , as it represents an electron in the spin-up state; we shall not adopt that notation here.) The uncoupling of the other states of interest follow: We can use these states to evaluate the relative transition linestrengths. There are two key simplification in the calculation; the first arises as a consequence of the electric dipole operator acting only in real space, and being able to change the orbital angular momentum of the atom. During an electric dipole transition neither the electron spin nor the nuclear spin nor their z-components can change. Therefore the only states that can be coupled by the electric dipole operator must have the same |S, m S and |I, M I . The second is the simplicity of the selection rule for transitions between states and |L, m L and |L , m L ; these are ΔL ≡ L − L = ±1, and Δm L ≡ m L − m L = ±1, 0, corresponding to σ ± , and π transitions, respectively. By defining the quantization axis z along B, the component of polarisation in the xy-plane results in a non-zero dipole matrix element if and only if Δm L = ±1. These transitions are called σ ± , driven by left (for σ + ) and right (for σ − )-hand circular polarised beams propagating along the quantization axis z [67]. Similarly, any component of electric field oscillating along z induces a Δm L = 0 dipole transition, which are known as π transitions. Note that each state in the uncoupled basis has products of vector-coupling coefficients, or 3 − j symbols. Therefore in evaluating a matrix element there will be terms with products of four vector-coupling coefficients; this is the origin of the 6 − j symbol in equation (14), as these are defined as a sum over products of four 3 − j symbols. The Wigner-Eckart theorem [120,135] is very useful in relating the m-dependence of such matrix elements. The theorem states that a matrix element specified by the m F values of the initial and final states, and the polarisation of the light (q), can be related to a reduced matrix element and a Clebsch-Gordan (or a 3 − j) symbol: (The 1 appearing on the right-hand side is a manifestation of the fact that the electric dipole operator is a vector. There is a more general form of the Wigner-Eckart theorem for arbitrary ranked tensors.) We can use the Wigner-Eckart theorem to relate the three transition strengths of interest to us, calculated above. As we are interested in the squares of the amplitudes we obtain: In this case with L = 0, L = 1, all three are equal; this is not true in general. Finally, we can calculate the ratios of the transition strengths for the three transitions 5 2 S 1/2 |F = 3, m F = +3 −→ 5 2 P 3/2 |F = 4, m F = +4, 3, 2 , given by the ratios of the squares of the dipole matrix elements: 1 : Obviously, this is far too elaborate a procedure to go through to calculate every transition strength of interest. Equation (14) can be used to calculate relative transition strengths; the purpose of this appendix is to unpack the calculation for one worked example, to give some insight into to the origin of the various factors in the expression.

Appendix B. Etalon effects
In many cases, the processing described in sections 3 and 4 for the electronic signals to be converted into a useful and quantitative atomic absorption spectra allows for excellent agreement between the experimental data and the theoretical model. Nevertheless, there are additional systematic effects which may be present in the processed signal and impede high precision measurements to be carried out reliably. We note that it is possible to study one of these etalon effects-the one arising owing to multiple reflections from the windows of the cell-to determine the atomic density and collisional broadening coefficient [251]. One such effect is apparent in the case where the frequency of the laser used to obtain the atomic absorption must be scanned over a range of tens or hundreds of GHz, particularly in the regions that are far off-resonance from the atomic transitions. Here, the large range of frequencies covered by the laser light leads to the formation of low-finesse etalons [127,145] from the optical system, in particular uncoated or misaligned surfaces. It is possible to take into account these low-finesse etalons in the signal background by considering the model proposed in [127,145,252]. The model is based on the analytic expression for the transmission signal T of an etalon [67], T = T peak 1 + (2F /π) 2 sin 2 (πν/ν FSR + φ) , where F is the finesse of the etalon, φ is the frequency offset of the etalon, T peak is the peak transmission of the etalon signal, ν is the frequency of the light and ν FSR has been defined previously in section 3.1.
Assuming that the finesse of the etalon is low, that is (1 − a j sin 2 (πν/ν j,FSR + φ j )). (B.3) We note that in equation (B.3) we are considering that each of the n etalons has a unique finesse and free-spectral-range, as well as an offset in phase. In practice, removing the effects of low-finesse etalons in the optical signals acquired can be done automatically without much additional complication in the processing of the data. Once an atomic absorption spectrum is acquired in the experimental setup, the data are processed following the steps discussed in section 3.
In doing this, the assumption is made that the effects of the etalons are not of a significant nature on the atomic absorption and the absorption profiles are thus not altered. We then recall equation (B.3) and divide the total transmission by the theoretical atomic absorption, T total /T atoms , in order to obtain a signal for the component of the total transmission due to the effects of the etalons in the optical system. This signal is then fit by using the expression (B.2) implemented as a custom model using the lmfit Python package [242,243]; three free parameters are used to characterise the etalon: its amplitude a, the free-spectral-range ν FSR and phase offset φ. Once a fit is obtained, the number of etalons included is increased iteratively, typically from n = 1 to n = 6, so that upon observation of the fit residuals there are no slowly-oscillating features and can be considered to be the experimental noise inherent to the light source and detector used. A similar process used in reference [145] reaches this limit after introducing n = 3 etalons in the fit of an atomic absorption spectrum.

Appendix C. Uncertainties in the frequency calibration process
The uncertainties in the frequency calibration of experimental spectra originate from the uncertainty in the horizontal axis of the raw data. In the first instance, this will be determined by the equipment used in the acquisition of the raw signals. For example, the data shown in figure 7(b), with a resolution of 50 μs, the manufacturer specifications state a ±2.5 p.p.m accuracy in the oscilloscope time base and an overall resolution of 250 fs. Note that a Tektronix DPO7254 oscilloscope was used throughout this work; more information is available at https://uk.tek.com/datasheet/dpo7000-series.
Given the raw times values for the experimental data, t raw , the final frequency value ν along the horizontal axis is determined by the expression ν = m t→ν t lin + c t→ν = m t→ν (t raw − t corr ) + c t→ν , ( C . 1 ) where t corr is the non-linear correction applied in order to linearise the time-axis, t lin is the linearised time value, (m t→ν ± σ m t→ν ) is the slope and (c t→ν ± σ c t→ν ) is the y-axis intercept of the calibration obtained from fitting the reference spectrum. The slope and the intercept have associated uncertainties that are used to calculate the uncertainty σ ν in the frequency value. Taking the standard formulas for the propagation of errors in reference [122], we arrive at the expression Using equation (C.2), σ ν can be determined for each data point along the linearised frequency axis, and used to estimate the percentage error in the frequency calibration over the extent of the frequency scan.