Tuesday, January 12, 2016

Processing: window functions

NMR data are often manipulated after acquisition to reduce artifacts or emphasize different aspects of the spectrum. One of the ways this is achieved is by multiplying the free induction decay (FID) by "window functions" to apodise the data. A typical application of a window function is to reduce the artifacts caused by incomplete sampling of the decaying NMR signal.

In the figure below, the top left panel shows a fully sampled FID and the bottom left panel shows the spectrum obtained after fourier transformation. The top right panel shows a truncated FID collected on the same sample, and the bottom right panel shows the spectrum produced by fourier transformation. Note that the peak obtained from the truncated FID is smaller, because less signal was recorded, and the baseline on either side exhibits decaying oscillating artifacts, often known as "sinc wiggles". Sinc wiggles are produced by a step in the FID, which in this case occurs at the end of the truncated FID where the signal has not decayed into the noise.

To remove the sinc wiggles an exponential window function can be applied to the truncated FID. This involves multiplying every point in the fid by a decaying exponential function that has a value of one at the start of the FID and approaches zero at its end.
The rate at which the exponential decays is controlled by a line broadening parameter (LB on Bruker spectrometers). Applying an exponential window reduces noise but increases line width. A "matched filter" is an exponential window where the line broadening parameter has been chosen to match the natural line width of the peaks in the spectrum, thereby maximising signal to noise without increasing linewidth and losing resolution.

In the figure below, the left panel shows several exponential window functions with different line broadening parameters. The right panel shows the results of applying these windows to the truncated FID in the top left panel of the figure above. Note how increasing the line broadening dampens the sinc wiggles and smooths out the noise, but the width of the peak increases.

To increase resolution a gaussian to lorentz transformation can be used. This converts the Lorentzian line shape of nmr resonances to a Gaussian line shape that is narrower at the base. Dramatic resolution enhancement can be obtained at the expense of signal to noise. The function is defined by two parameters, LB and GB. LB is equivalent to LB used for the exponential function, but is negative. GB takes values between zero and one and controls which part of the FID is emphasised.
In the left panel of the figure below several GM window functions using different values of LB and GB are shown. The right panel shows their effect on two doublets of doublets. Notice how the more negative values of LB de-emphasise the start of the FID at the expense of the middle, leading to a reduction in signal to noise but also an increase in resolution. If you look carefully at the peaks in the pale green spectrum processed with LB=-2.0 and GB=0.9 at the bottom of the right panel, you can see additional small couplings starting to resolve. These small couplings are around 0.5 Hz, while the larger coupling between the doublets is 1.5 Hz.

Both the exponential and the gaussian window functions approach zero at the end of the FID, but never quite reach it. This means that larger line broadening values need to be used to completely remove sinc wiggles from truncated data. Sine bell windows do reach zero and are often used for processing 2D data that is likely to be truncated. Only the positive side of the sine function is used and the starting position is chosen to be somewhere between 0 and 90o along the sine curve. On Bruker spectrometers the start of the function is defined by the parameter SSB which is used to divide π to obtain the starting position. For example setting SSB=2 will start the window function at 90o, the highest point of the sine curve.
In the figure below three different sine bell functions are shown. The red curve shows a sine bell with SSB=2, in effect a cosine function. Setting SSB=4 shifts the starting point of the window closer to zero as shown by the green line. The maroon line is a QSIN function which is simply a squared sine function, in this case with SSB=2 again.

In the default SSPPS parameter sets all the 1D experiments use an exponential window function. LB is set to 0.3 in 1H experiments and 1.0 in 13C experiments. For all but one of the 2D parameter sets the window function is set to the QSIN function with SSB=2 in both dimensions. The one exception is the non phase sensitive COSY experiment which produces large star shaped crosspeaks. For this experiment a sine bell with zero offset is used to convert the peak shape to a more oval shape. These are the standard settings but trying different windows may allow you to improve the look of your data and extract more information.


  1. In earlier days, with far-less computing power at hand, the time taken to carryout FFT (so-called Fast Fourier Transform) of standard 2D NMR data sets was of the order of ~1 hour. These days (on a PC!) FFT seems instantaneous. My point: experiment with window functions; compare and contrast. It's often surprising how much 'hidden' data comes out with the right apodization!

  2. Thanks, Brendan. Always insightful and practical. In times past (think 'big-hair' rock bands), FFT on say a standard COSY would take about 30-45 minutes. I recall being able to tease out more detail (weak cross peaks, refined resolution) by re-processing this 2D acquisition data using different apodization. It was still worth the extra time. Nowadays, when FFT takes the blink of an eye, I can't see any reason not to try.