Piecewise Baseline Correction

Sometimes it is extremely difficult to fit the whole baseline. It may be sufficient, 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.
Alternatively, different regions of the spectrum can be fitted independently, using different correction methods or parameters.

To Correct Only a Piece of the Baseline:

  1. Select the region to correct: click and drag; the selection is gray.
  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.
  3. If a partial correction has been performed before, a region may still be stored in memory. In that case, click Reset Region to ensure that the current selection replaces the stored one.
    The ppm limits displayed in the dialog correspond to the stored region.
  4. Continue as with a normal baseline correction. Select the parameters. Click OK when you are satisfied with the fit.
  5. In the case of a polynomial correction applied to a 1-D spectrum, the polynomial is fitted using only the selected region, but the resulting correction is applied to the entire spectrum.
    The console command perm() makes the correction permanent within the selected region and removes it elsewhere.
  6. To correct another region, repeat from step 1. You can adopt different methods and parameters each time.
  7. To save the corrected spectrum, choose File > Export.
    A document stores only the parameters for the last correction; therefore, you need to export and preserve the processed spectrum. It is possible to reproduce the entire processing: the solution is to perform it with a script. The latter can be saved in the document itself.

The quality of the fitting model is proportional to the number of sampled points. All things remaining equal, it is easier to fit a large region than a small one. If a small region must be fitted because it is more regular, avoid using a high-order polynomial (for example, a 7th-order polynomial).

Related Topics

Baseline Correction in 2-D and 3-D

Suppressing Nasty Signals

Adjusting the Integrals