# Spectral line shape

Spectral line shape or spectral line profile describes the form of an electromagnetic spectrum in the vicinity of a spectral line – a region of stronger or weaker intensity in the spectrum. Ideal line shapes include Lorentzian, Gaussian and Voigt functions, whose parameters are the line position, maximum height and half-width. Actual line shapes are determined principally by Doppler, collision and proximity broadening. For each system the half-width of the shape function varies with temperature, pressure (or concentration) and phase. A knowledge of shape function is needed for spectroscopic curve fitting and deconvolution.

## Origins

A spectral line can result from an electron transition in an atom, molecule or ion, which is associated with a specific amount of energy, E. When this energy is measured by means of some spectroscopic technique, the line is not infinitely sharp, but has a particular shape. Numerous factors can contribute to the broadening of spectral lines. Broadening can only be mitigated by the use of specialized techniques, such as Lamb dip spectroscopy. The principal sources of broadening are:
* Lifetime broadening. According to the uncertainty principle the uncertainty in energy, ΔE and the lifetime, Δt, of the excited state are related by
    $\Delta E\Delta t\gtrapprox \hbar$
    This determines the minimum possible line width. As the excited state decays exponentially in time this effect produces a line with Lorentzian shape in terms of frequency (or wavenumber).
* Doppler broadening. This is caused by the fact that the velocity of atoms or molecules relative to the observer follows a Maxwell distribution, so the effect is dependent on temperature. If this were the only effect the line shape would be Gaussian.
* Pressure broadening (Collision broadening). Collisions between atoms or molecules reduce the lifetime of the upper state, Δt, increasing the uncertainty ΔE. This effect depends on both the density (that is, pressure for a gas) and the temperature, which affects the rate of collisions. The broadening effect is described by a Lorentzian profile in most cases.
* Proximity broadening. The presence of other molecules close to the molecule involved affects both line width and line position. It is the dominant process for liquids and solids. An extreme example of this effect is the influence of hydrogen bonding on the spectra of protic liquids.
Observed spectral line shape and line width are also affected by instrumental factors. The observed line shape is a convolution of the intrinsic line shape with the instrument transfer function.
Each of these mechanisms, and others, can act in isolation or in combination. If each effect is independent of the other, the observed line profile is a convolution of the line profiles of each mechanism. Thus, a combination of Doppler and pressure broadening effects yields a Voigt profile.

## Line shape functions
### Lorentzian

A Lorentzian line shape function can be represented as
    $L={\frac {1}{1+x^{2}}},$
where L signifies a Lorentzian function standardized, for spectroscopic purposes, to a maximum value of 1; $x$ is a subsidiary variable defined as
    $x={\frac {p-p_{0}}{w/2}},$
where $p_{0}$ is the position of the maximum (corresponding to the transition energy E), p is a position, and w is the full width at half maximum (FWHM), the width of the curve when the intensity is half the maximum intensity (this occurs at the points $p=p_{0}\pm {\frac {w}{2}}$). The unit of $p_{0}$, $p$ and $w$ is typically wavenumber or frequency. The variable x is dimensionless and is zero at $p=p_{0}$.
In Nuclear Magnetic Resonance it is possible to measure spectra in a phase sensitive manner. In those cases it is important to decompose the Lorentzian into its absorptive and dispersive parts, meaning real and imaginary parts respectively.
The full Lorentzian lineshape is a result from the Fourier Transform of a Free Induction Decay and takes the following form:
$L(\omega )={\frac {1}{{\frac {1}{T_{1}}}-i(\omega -\omega _{0})}}={\mathcal {F}}[e^{-t/T_{1}}e^{i\omega _{0}t}]$
This can be expanded into the real and imaginary part by quadratic expansion of the denominator:
$L(\omega )={\frac {1/T_{1}}{(1/T_{1})^{2}+\omega ^{2}}}+{\frac {i\omega }{(1/T_{1})^{2}+\omega ^{2}}}$
Taking only the real part of this expression yields the less general, but more common form of the Lorentz lineshape.

### Gaussian

The Gaussian line shape has the standardized form,
    $G=e^{-(\ln 2)x^{2}}.$
The subsidiary variable, x, is defined in the same way as for a Lorentzian shape. Both this function and the Lorentzian have a maximum value of 1 at x = 0 and a value of 1/2 at x=±1.

### Voigt

The third line shape that has a theoretical basis is the Voigt function, a convolution of a Gaussian and a Lorentzian,
    $V(x;\sigma ,\gamma )=\int _{-\infty }^{\infty }G(x';\sigma )L(x-x';\gamma )\,dx',$
where σ and γ are half-widths. The computation of a Voigt function and its derivatives are more complicated than a Gaussian or Lorentzian.

### Spectral fitting

A spectroscopic peak may be fitted to multiples of the above functions or to sums or products of functions with variable parameters. The above functions are all symmetrical about the position of their maximum. Asymmetric functions have also been used.

## Instances
### Atomic spectra

For atoms in the gas phase the principal effects are Doppler and pressure broadening. Lines are relatively sharp on the scale of measurement so that applications such as atomic absorption spectroscopy (AAS) and Inductively coupled plasma atomic emission spectroscopy (ICP) are used for elemental analysis. Atoms also have distinct x-ray spectra that are attributable to the excitation of inner shell electrons to excited states. The lines are relatively sharp because the inner electron energies are not very sensitive to the atom's environment. This is applied to X-ray fluorescence spectroscopy of solid materials.

### Molecular spectra

For molecules in the gas phase, the principal effects are Doppler and pressure broadening. This applies to rotational spectroscopy, rotational-vibrational spectroscopy and vibronic spectroscopy.
For molecules in the liquid state or in solution, collision and proximity broadening predominate and lines are much broader than lines from the same molecule in the gas phase. Line maxima may also be shifted. Because there are many sources of broadening, the lines have a stable distribution, tending towards a Gaussian shape.

### Nuclear magnetic resonance

The shape of lines in a nuclear magnetic resonance (NMR) spectrum is determined by the process of free induction decay. This decay is approximately exponential, so the line shape is Lorentzian. This follows because the Fourier transform of an exponential function in the time domain is a Lorentzian in the frequency domain. In NMR spectroscopy the lifetime of the excited states is relatively long, so the lines are very sharp, producing high-resolution spectra.

### Magnetic resonance imaging

Gadolinium-based pharmaceuticals alter the relaxation time, and hence spectral line shape, of those protons that are in water molecules that are transiently attached to the paramagnetic atoms, resulting contrast enhancement of the MRI image. This allows better visualisation of some brain tumours.

## Applications
### Curve decomposition

Some spectroscopic curves can be approximated by the sum of a set of component curves. For example, when Beer's law
    $A_{\lambda }=\sum _{k}\epsilon _{k,\lambda }c_{k}$
applies, the total absorbance, A, at wavelength λ, is a linear combination of the absorbance due to the individual components, k, at concentration, c$_k$. ε is an extinction coefficient. In such cases the curve of experimental data may be decomposed into sum of component curves in a process of curve fitting. This process is also widely called deconvolution. Curve deconvolution and curve fitting are completely different mathematical procedures.
Curve fitting can be used in two distinct ways.
* The line shapes and parameters $p_{0}$ and $w$ of the individual component curves have been obtained experimentally. In this case the curve may be decomposed using a linear least squares process simply to determine the concentrations of the components. This process is used in analytical chemistry to determine the composition of a mixture of the components of known molar absorptivity spectra. For example, if the heights of two lines are found to be h$_1$ and h$_2$, c$_1$ = h$_1$ / ε$_1$ and c$_2$ = h$_2$ / ε$_2$.
* Parameters of the line shape are unknown. The intensity of each component is a function of at least 3 parameters, position, height and half-width. In addition one or both of the line shape function and baseline function may not be known with certainty. When two or more parameters of a fitting curve are not known the method of non-linear least squares must be used. The reliability of curve fitting in this case is dependent on the separation between the components, their shape functions and relative heights, and the signal-to-noise ratio in the data. When Gaussian-shaped curves are used for the decomposition of set of N$_{sol}$ spectra into N$_{pks}$ curves, the $p_{0}$ and $w$ parameters are common to all N$_{sol}$ spectra. This allows to calculated the heights of each Gaussian curve in each spectrum (N$_{sol}$·N$_{pks}$ parameters) by a (fast) linear least squares fitting procedure, while the $p_{0}$ and w parameters (2·N$_{pks}$ parameters) can be obtained with a non-linear least-square fitting on the data from all spectra simultaneously, thus reducing dramatically the correlation between optimized parameters.

### Derivative spectroscopy

Spectroscopic curves can be subjected to numerical differentiation.
When the data points in a curve are equidistant from each other the Savitzky–Golay convolution method may be used. The best convolution function to use depends primarily on the signal-to-noise ratio of the data. The first derivative (slope, ${\frac {dy}{dx}}$) of all single line shapes is zero at the position of maximum height. This is also true of the third derivative; odd derivatives can be used to locate the position of a peak maximum.
The second derivatives, ${\frac {d^{2}y}{dx^{2}}}$, of both Gaussian and Lorentzian functions have a reduced half-width. This can be used to apparently improve spectral resolution. The diagram shows the second derivative of the black curve in the diagram above it. Whereas the smaller component produces a shoulder in the spectrum, it appears as a separate peak in the 2nd. derivative. Fourth derivatives, ${\frac {d^{4}y}{dx^{4}}}$, can also be used, when the signal-to-noise ratio in the spectrum is sufficiently high.

### Deconvolution

Deconvolution can be used to apparently improve spectral resolution. In the case of NMR spectra, the process is relatively straight forward, because the line shapes are Lorentzian, and the convolution of a Lorentzian with another Lorentzian is also Lorentzian. The Fourier transform of a Lorentzian is an exponential. In the co-domain (time) of the spectroscopic domain (frequency) convolution becomes multiplication. Therefore, a convolution of the sum of two Lorentzians becomes a multiplication of two exponentials in the co-domain. Since, in FT-NMR, the measurements are made in the time domain division of the data by an exponential is equivalent to deconvolution in the frequency domain. A suitable choice of exponential results in a reduction of the half-width of a line in the frequency domain. This technique has been rendered all but obsolete by advances in NMR technology. A similar process has been applied for resolution enhancement of other types of spectra, with the disadvantage that the spectrum must be first Fourier transformed and then transformed back after the deconvoluting function has been applied in the spectrum's co-domain.