Differential optical absorption spectroscopy
In atmospheric chemistry, differential optical absorption spectroscopy (DOAS) is used to measure concentrations of trace gases. When combined with basic optical spectrometers such as prisms or diffraction gratings and automated, ground-based observation platforms, it presents a cheap and powerful means for the measurement of trace gas species such as ozone and nitrogen dioxide. Typical setups allow for detection limits corresponding to optical depths of 0.0001 along lightpaths of up to typically 15 km and thus allow for the detection also of weak absorbers, such as water vapour, Nitrous acid, Formaldehyde, Tetraoxygen, Iodine oxide, Bromine oxide  and Chlorine oxide. Theory. DOAS instruments are often divided into two main groups: passive and active ones. The active DOAS system such as longpath(LP)-systems and cavity-enhanced(CE) DOAS systems have their own light-source, whereas passive ones use the sun as their light source, e.g. MAX(Multi-axial)-DOAS. Also the moon can be used for night-time DOAS measurements, but here usually direct light measurements need to be done instead of scattered light measurements as it is the case for passive DOAS systems such as the MAX-DOAS. The change in intensity of a beam of radiation as it travels through  a medium that is not emitting is given by Beers law: where "I" is the intensity of the radiation, formula_2 is the density of substance, formula_3 is the absorption and scattering cross section and "s" is the path. The subscript "i" denotes different species, assuming that the medium is composed of multiple substances. Several simplifications can be made. The first is to pull the absorption cross section out of the integral by assuming that it does not change significantly with the path—i.e. that it is a constant. Since the DOAS method is used to measure total column density, and  not density per se, the second is to take the integral as a single parameter which we call column density: The new, considerably simplified equation now looks like this: If that was all there was to it, given any spectrum with sufficient resolution and spectral features, all the species could be solved for by simple algebraic inversion. Active DOAS variants can use the spectrum of the lightsource itself as reference. Unfortunately for passive measurements, where we are measuring from the bottom of the atmosphere and not the top, there is no way to determine the initial intensity, "I". Rather, what  is done is to take the ratio of two measurements with different paths through the atmosphere and so determine the difference in optical depth between the two columns (Alternative a solar atlas can be employed, but this introduces another important error source to the fitting process, the instrument function itself. If the reference spectrum itself is also recorded with the same setup, these effects will eventually cancel out): A significant component of a measured spectrum is often given by scattering and continuum components that have a smooth variation with respect to wavelength. Since these don't supply much information, the  spectrum can be divided into two parts: where formula_8 is the continuum component of the spectrum and formula_9 is that which remains and we shall call the differential cross-section. Therefore: where we call formula_11 the differential optical depth (DOD). Removing the continuum components and adding in the wavelength dependence produces a matrix equation with which to do the inversion: What this means is that before performing the inversion, the continuum components from both the optical depth and from the species cross sections must be removed. This is the important “trick” of the DOAS method. In practice, this is done  by simply fitting a polynomial to the spectrum and then subtracting it. Obviously, this will not produce an exact equality between the measured optical depths and those calculated with the differential cross-sections but the difference is usually small. Alternatively a common method which is applied to remove broad-band structures from the optical density are binomial high-pass filters. Also, unless the path difference between the two measurements can be strictly determined and has some physical meaning (such as the distance of telescope and retro-reflector for a longpath-DOAS system), the retrieved quantities, formula_13 will be meaningless. The  typical measurement geometry will be as follows: the instrument is always pointing straight up. Measurements are taken at two different times of day: once with the sun high in the sky, and once with it near the horizon. In both cases the light is scattered into the instrument before passing through the troposphere but takes different paths through the stratosphere as shown in the figure. To deal with this, we introduce a quantity called the airmass factor which gives the ratio between the vertical column density (the observation is performed looking straight up, with the sun at full zenith) and  the slant column density (same observation angle, sun at some other angle): where amf is the airmass factor of species "i", formula_15 is the vertical column and formula_16 is the slant column with the sun at zenith angle formula_17. Airmass factors can be determined by radiative transfer calculations. Some algebra shows the vertical column density to be given by: where formula_19 is the angle at the first measurement geometry and formula_20 is the angle at the second. Note that with this method, the column along the common path will be subtracted from our measurements and cannot be recovered. What  this means is that, only the column density in the stratosphere can be retrieved and the lowest point of scatter between the two measurements must be determined to figure out where the column begins.