Baseline Fitting

The baseline fitting package is a baseline fitting utility for spectral data. It provides an interface that allows the user to select regions of the spectrum and to fit the spectrum in those regions with a built-in or user defined function.

Features include:

  1. The graph marquee can be used to quickly select regions for fitting
  2. Option to fit many traces at once
  3. Smoothed spline baseline
  4. Interactive 'line between cursors' baseline
  5. Option to fit a tangent to two curved regions of spectrum
  6. Procedure file includes instructions for adding a user-defined fitting function

baselines preview

How to use the Baseline Fitting package

The spectra to be fit must be plotted in the top graph window. When you select Baselines from the macros menu a baseline control panel is attached to the graph. Select spectrum and baseline type from popup menus in the control panel. Use the graph marquee tool (click and drag) to select a region of the spectrum, then either click within the marquee and select Add region to fit, or click the + button in the control panel to add the selected range of data to the fit. The fit is updated each time you change the data selection. Subtract will make copies of the current baseline and baseline-subtracted waves in the current data folder. The All In One button fits the same baseline to each of the traces on the plot, automatically subtracting the baseline from each plotted spectrum. The output waves have a _Sub or _BL suffix. Close the panel to clean up after fitting.

Some baseline options

Most of Igor's built-in curve fitting functions are selectable as baseline types.

The tangent baseline will attempt to find a common tangent to two cubic functions. You must have two regions selected for fitting. The fit will be successful only if the selected regions can each be fit nicely with a cubic function, and if the two cubics have a common tangent.

The line between cursors baseline draws a line that passes through the free cursors labelled I and J. The baseline updates as you move the cursors.

The gauss3  and lor3 baselines fit a Gauss1D or lor function with the first coefficient set to 0.

Choose spline to fit a smoothing spline though the masked regions. A SetVariable control will appear on the panel, allowing you to adjust the smoothness parameter until you're satisfied with the fit.

If you wish to add a user-defined fitting function, take a look at the functions at the end of the baselines procedure file. Edit these functions where indicated to wrap your own fitting code into the baseline fitting GUI.

See also my Arc Hull package for a collection of baselines that are fully defined and reproducible. For a more free-form baseline fitting method, see my Baseline Spline Fit package.

Installing this package

  • Consider using the IgorExchange Installer to install Baselines.ipf in the User Procedures folder.
  • The Procedure Loader can be used to load or unload files stored in the User Procedures folder.

Images:

baselines preview

Project Details

Current Project Release

Baseline Fitting IGOR.7.00.x-3.20

Release File: Baselines320.zip
Version: IGOR.7.00.x-3.20
Version Date: Fri, 07/10/2020 - 02:27 am
Version Major: 3
Version Patch Level: 2
OS Compatibility: Windows Mac-Intel
Release Notes:

Fixes bug introduced when rtGlobals pragma setting was changed in a previous release

View All Releases

Forum

Support

Gallery

Igor Pro 8

Learn More

Igor XOP Toolkit

Learn More

Igor NIDAQ Tools MX

Learn More