# Baseline Correction: an Introduction

iNMR allows you to flatten the baseline (or the baseplane) and make it equal to zero. It may be necessary to correct the baseline/baseplane for one of the following reasons:

1. The user wants to measure integrals.
2. Small cross-peaks in a 2D spectrum are hidden by the tails of large diagonal peaks.
3. The spectrum looks ugly.

NMR theory says that spectral baselines do not have the shape of a polynomial function. Computing theory says that polynomial functions are troublesome to fit. Practice says that polynomial functions are by far the best alternative, for more than one reason. That's why, using iNMR, you only have polynomial functions, up to the 7th degree. You have an important alternative: without fitting the baseline to any model, you can directly simply to suctract it from the spectrum! From the regions corresponding to peaks iNMR will subtract segments of straight lines. Before being subtracted, the baseline can be smoothed to a variable degree.

Regarding the choice of the coefficients for the polynomial correction, spectra can be divided in two classes. Bidimensional spectra and 13C decoupled spectra contain many wide regions with no peak, while 1H spectra are normally more crowded. In the first two cases it's better to let iNMR perform the job of calculating the coefficients; in the latter case it's better if the user fits the baseline visually. The former solution is called automatic correction, the latter is called manual correction and is only available for 1D spectra.

Baseline correction is only performed on the real component of the spectrum. In 1d spectroscopy, it is quite independent from phase correction, so you can alternate freely between phase and baseline correction. In 1d you can also remove the baseline correction.
This is possible because the polynomial correction is applied on the fly and the uncorrected spectrum is always available. This particular behaviour makes it impossible to fit two regions with two different polynomials. The command “perm()” (only accessible from the console) changes behaviour and make such multiple corections feasible.

In 2d, instead, the imaginary part, if still present, is removed before baseplane correction. To remove the correction it is necessary to reload raw data (the FID) and repeat processing. Baseplane correction is actually a baseline correction repeated along each row. iNMR cannot process columns. If the user asks for a correction along columns, iNMR automatically transposes the spectrum. After the correction the spectrum remains transposed. To bring it back in the old orientation, the user must explicitly transpose with the command ‘Format/Axes & Scales’ (or press the key: “T”).

## Full Automatic Correction

The last button in the palette (red sloping baseline with a gear) has no equivalent in the menus. It performs a “Whittaker Smoother” correction with pre-set parameters, in 1D, and a polynomial correction in 2D spectroscopy. The similar button nearby (the one without the gear) opens the dialog for semi-automatic Correction.

## Fitting the Baseline with a Straight Line

Some 1D spectra have a sloping baseline that can be accurately fitted with a straight line. In this case you can let iNMR do (almost) everything with the command “Straight Line”. If the spectral width is so large that the first and the last 5% of the spectrum don't contain peaks, start from the spectrum at full expansion. iNMR will fit the wings of the spectrum. The first and the last 1% will be ignored, because they are often irregular.
When, instead, the spectrum, after a zooming operation, is not fully visible, iNMR will fit the wings of the currently displayed region. Therefore you have a chance to modulate this function.