Line Broadening

Procedure File containing functions (and wrapper procedures with Menu calls) for convolving waveform data with standard spectroscopic peak shapes (Gaussian, Lorentzian and Voigt) with x-scaling awareness and preservation of integral normalization.

Also supplies functions to convert X,Y line data to combined waveform data (think adding a lineshape function to a spectral simulation given just frequencies and intensities). This is a much faster way to add a single lineshape function to a large set of X,Y line data than a direct approach using a wave assignment statement and a peak function, although it is not as flexible as the latter, requiring a single characteristic width (and any other peak shape characteristics besides center position and intensity) for the whole set.

Project Details

Current Project Release

Line Broadening IGOR.6.20.x-1.1

Release File: LineBroadening_0.ipf (32.46 KB)
Version: IGOR.6.20.x-1.1
Version Date:
Version Major: 1
Version Patch Level: 1
OS Compatibility: Mac-Intel Windows
Release Notes: Updates for Version 1.1

BUG FIX:
Corrected formula for Gaussian to produce correct half-widths (this had been off by sqrt(2), and also affected the width of the Voigt function because of the method used to generate the Voigt)

FASTER FILL ALGORITHM FOR LINE BROADENING
Added option to use the built in Igor Histogram operation (with the weighted histogram option) in the "FillDestWave" function.
This significantly speeds up the fill process which is usually the rate limiting step if there are many lines present in the X,Y data.
It is slightly less accurate on a peak by peak basis:
The built in weighted histogram only allows each line to accumulate into a single bin, while the original algorithm splits the intensity between two
adjacent bins by interpolation. The old algorithm handles X value digitization error a little bit better (modeling a peak centered halfway between output points), but at the expense of having to explicitly loop through each X,Y data pair in function code which is much slower than using the built in operation.

For data with discrete, recognizeable peaks and perhaps some desire to fit linewidths and/or positional offsets, it is probably better to stick to the
original, more accurate algorithm. For faster simulations, though, the built in weighted histrogram crushes the more accurate algorithm, and since this line broadening method was originally programmed specifically to speed up a the line broadening process, I'm tempted to make the histogram method the new default.
For now, I'm leaving the default as the old algorithm for backwards compatibility, but an optional argument can be called to run the faster algorithm.

Both algorithms suffer digitization error that gets worse when you increase the point spacing relative to the linewidth, with the relative errors of the methods diverging.
For data with large sets of (X,Y) pairs you may find that at constant calculation speed, the increased point density allowed with the faster fill algorithm ends up just as accurate as the the slower but more accurate algorithm with larger point spacing. Some experimentation is required.

NEW FUNCTIONS: GenFuncConvolve(...), GenFuncBroaden(...), GenFuncGuessExtent(...)

Similar in usage to the pre-defined *Convolve and *Broaden functions, but with the ability to pass a function reference describing the peak shape to use
(use the same form as Igor peak fitting functions: function mypeakfunc(coefs, X). For more details, see comments on the GenFuncConvolve functions.
View All Releases

Forum

Support

Gallery

Igor Pro 9

Learn More

Igor XOP Toolkit

Learn More

Igor NIDAQ Tools MX

Learn More