Sun, 01/17/2021 - 08:20 am
A user interface that uses the graph marquee as an efficient way to select an x-range in order to make quick estimates of peak parameters.
This is based on code that I've used for many years before cleaning up and posting here. Most of these parameters could be equally well determined by positioning cursors and using command line or quick fit menus, but I find the graph marquee to provide an especially efficient interface for selecting regions of interest. For more advanced decomposition of overlapping peaks Igor's multipeak fitting package works well, and global fitting is useful for fitting with linked coefficients. But, when you have many spectra plotted in a graph and want to produce just a quick list of peak heights for all of the traces, you may find Marquee Peaks to be helpful.
Most of the Marquee Peak functions use the graph marquee to select a subrange of a plotted trace. They're used to determine peak heights, areas, centroids (centres of mass), and full-width at half-maximum (FWHM). Right click within the graph marquee to select which of these you want to calculate. When a trace is selected from the list of traces that pass though the marquee, the results of the calculation are written to history and shown in a tag on the graph. Select the 'clear' submenu to remove tags from the plot.
Spectra must be baseline-free for these functions to be useful! Fit-derived uncertainties are not really meaningful.
Peak height: fits a third order polynomial through the selected range, and then tries to find the peak by looking for the first zero-gradient within that selected range. For this to work nicely you should select a narrow region around the peak. I used a polynomial so that it should work with asymmetric peaks. Also gives peak position.
Area and Centroid: integrates the data over the selected range and calculates both the centre of mass and the position of area/2 in the integral wave. Also gives area.
Peak fit: Selects the best fit from Gaussian, Lorentzian and Voigt over the selected x-range. Gives peak height, FWHM, area, and position for the best fit.
Doublet Peak: Attempts to fit a pair of peaks to a doublet and derives peak position, height, FWHM, and area parameters. Works best if the peaks are positioned at 1/4 and 3/4 of the selected x-range. Selects the best fit from attempts to fit a pair of Lorentzian, Gaussian and Voigt peaks.
Includes options to do all-in-one determinations for all of the traces on the plot. The results of all-in-one calculation are presented in a table. The waves displayed in the table are located in the package folder. It's up to the user to copy data into a more useful location.
This package also has some functions for normalizing spectra by peak height, peak area or total area. To normalize by total area or wavemax, use the trace and all traces menus (right click or shift-right click on a trace). The normalizing value can be changed in the settings window.
'Print Waves in Marquee' prints the names of marquee traces in the history.
Settings can be configured thorough the Analysis - Marquee Peaks Settings... menu. The traces and tags that Marquee Peaks adds to a graph window are removed either on the next mouseup, or when another Marquee Peak operation is selected, depending on the option selected.
Note: for Voigt fits, the approximate peak FWHM is used as a fit coefficient. The data are fit using the accurate VoigtPeak function. This method allows some kind of uncertainty for peak FWHM to be derived from curve fitting.
Current Project Release
Marquee Peaks IGOR.8.00.x-2.10
|Release File:||Marquee Peaks210.zip|
|Version Date:||Mon, 05/30/2022 - 08:38 am|
|Version Patch Level:||10|
|OS Compatibility:||Windows Mac-Intel|
Minor code cleanup to ensure compatibility with other projects
Igor Pro 9
Igor XOP Toolkit
Igor NIDAQ Tools MX