 Atomic Density Matrix Tutorial

# Linear Absorption Fitting

The density of an atomic vapor can be determined by measuring the absorption of weak resonant light. In this example we use the LinearAbsorption function from the AtomicDensityMatrix package along with values from the AtomicData database to construct a fitting function for linear absorption on an alkali D-line. Fitting a linear absorption spectrum with this function allows the atomic density to be extracted.
Choose a transition. The names of the upper and lower states are taken from a database.
 Out= Get all of the necessary atomic parameters from the database.
 Out= Out= Construct a list of all of the sublevels of the atomic system.
 Out//TableForm= We define the Doppler width as the magnitude of the Doppler shift corresponding to the most probable speed in the Maxwell velocity distribution.
Doppler width in units at 293 Kelvin.
 Out= LinearAbsorption[sys, , D, P] finds the absorption by system sys with Doppler width D and pressure broadening P for weak light of frequency . The value returned is the fractional absorption per unit atomic density and optical path length.
Find linear absorption by this system for light with detuning from resonance, assuming pressure broadening by 100 MHz.
 Out= The line shape of each resonance is given in terms of the (pressure-broadened) natural line width and the Doppler width D by the Voigt profile, which is a convolution of a Lorentzian and a Gaussian profile.
Voigt gives the Voigt profile.
 Out= Here is the full width at half maximum (FWHM) of the Lorentzian profile, which we can show by solving for the FWHM in the special case of D=0.
 Out= Out= Solving for the FWHM in the special case of =0, we find the FWHM for the Gaussian profile in terms of the Doppler width D. Out= Out= For atomic vapors with multiple species (e.g., the vapor from a sample with multiple isotopes in natural abundance), we can calculate absorption due to each species and add the absorption formulas together. For the case of natural abundance, we can multiply the term for each isotope by the relative abundance.
Abundance gives the relative abundance of a state, taken from the AtomicData database.
 Out= To speed up computations, create an interpolating function from the absorption. The minimum and maximum limits here may need to be adjusted.
 Out= Plot the interpolating function.
 Out= To find transmission for a possibly optically thick medium, take Exp[n length abs], where n is atomic density and length is the optical path length through the vapor cell. The length could be set to the correct value in centimeters here. Or it can be left at 1, in which case we will extract density times path length in cm-2 from the fit, rather than density in cm-3.
We also include four more parameters that allow shifting and scaling the x and y axes so that the data can be fit: a shifts the x axis, b stretches the x axis, c scales the y axis, and d produces a background slope.
Create the transmission function.
 Out= Here we make some fake data for testing.
Plot the data.
 Out= To fit the data we can use the PlotAndFit function, which makes it somewhat more convenient to adjust the fit starting parameters by hand prior to fitting. If is chosen, the fitting function is plotted using the initial values. This allows the initial values to be adjusted by hand until they are close enough to the true values for the fitting routine to work properly. The shift parameter a is particularly important to get fairly close.
Fit the data. Out= If the length parameter was set to the correct value above, then the fitted value for n is the atomic density in cm-3.
The GUIPlotAndFit version of the function brings up a dialog that provides a little more interactivity.
 Out= Note that, when obtaining the absorption data, it is very important that the signal voltage goes to zero when the light is completely blocked. Otherwise the background offset will throw off the density results. Also, if the light power is too high, the absorption will not be in the linear regime, which will also skew the results.  