iNMR icon

Correcting the Baseline Piecewise

Sometimes it's extremely difficult to fit the whole baseline. It can be enough, however, to correct only the part of the spectrum that contains the most relevant peaks. That local part of the baseline can be easier to fit with a polynomial function. Another approach is to fit two or more parts of the spectrum with different functions.

To Correct only a Piece of the Baseline:

Step 1

Select the region to correct: click and drag; the selection is grey.

Step 2

Choose Process > Baseline Correction.

You will see new controls: “only to this region”, “Reset region”, etc...
They appear because you've selected a region.

Step 3

If a partial correction has been performed in the past, it can remain in memory. In this case, press Reset region to be sure that the current selection overrides the selection in memory.

Read the ppm limits reported inside the dialog: that's the memorized selection.

Step 4

Continue as with a normal baseline correction. Select the parameters. Click OK when you are satisfied by the fit.

Step 5

In the case of a polynomial correction applied to a 1-D spectrum, the baseline will be fitted in the selected region only, but it will be corrected everywhere.

There's a way to overcome this limitation. The console command perm() makes the correction permanent for the selected region and removes the correction from the rest.

Step 6

To correct another region, repeat from step 1.

You can adopt different methods and parameters each time.

Step 7

To save the corrected spectrum, choose File > Export.

A document only stores the parameters for last correction, therefore the need to export and preserve the processed spectrum. It would be possible to reproduce the whole processing, yet it's not simple: the solution is to perform the processing with a script. The latter can be saved into the document itself.

The quality of the fitting model is proportional to the number of sampled points. All things remaining equal, it's easier to fit a large region than a small one. If you are forced to fit a small region, because it's more regular, avoid a polynomial of the 7th order.

Related Topics

Baseline Correction in 2-D and 3-D

Suppressing Nasty Signals

Adjusting the Integrals