Peak Fitting Guide: Line Shapes and Curve Fitting Theory in Spectroscopy

Curve fitting — also called peak fitting or band deconvolution — describes a measured spectral envelope as the sum of several individual peaks. This guide covers the physics behind the peak shapes, how to choose between them, and what a set of worked experiments reveals about when curve fits succeed and how they fail.

For the step-by-step tutorial and the software controls, see Peak Fitting in Peak® Spectroscopy Software.

Why Peaks Are Gaussian or Lorentzian

Quantum theory says that an isolated molecule absorbs at a single, sharply defined frequency. Real samples do not produce sharp lines, because a real molecule sits in a bath of neighbors that it interacts with. No two molecules see quite the same surroundings at the same instant, so each one vibrates at its own slightly displaced frequency. What you measure is every one of those absorptions added together, which is why the band has width at all. Two time constants govern the result:

  • The amplitude correlation time (the vibrational lifetime) — how long the excited molecule stays excited before it relaxes, typically a few picoseconds.
  • The coherence lifetime — how long the excited molecules keep vibrating in phase with one another. Once they dephase, their contributions interfere and cancel, and the spectrometer can no longer see them even though the vibrational energy has not yet been lost.

Which of the two dominates determines the shape of the band, and the shape is therefore a property of the physical state of the sample, not an arbitrary curve-fitting choice.

  • Gaussian. When relaxation happens before dephasing becomes severe, as in a solid whose environment is essentially frozen, the band shape is the statistical distribution of the many static environments — the familiar bell curve. It has a rounded top and wings that die away very quickly.
  • Lorentzian. When dephasing dominates, as in a gas where rotation and collisions randomize phase rapidly, the exponential population relaxation produces a Lorentzian. It rises to a sharper maximum, but its wings decay slowly and reach much further out.
  • Blends. Liquids and most condensed phases lie between the two extremes and carry both characters.

The Mathematical Forms, and Peak Area

With peak center x0, peak height h and full width at half height w (FWHH, also written FWHM), the two basic profiles are:

G(x) = h · exp[ −4·ln2·(x − x0)2 / w2 ] Gaussian
L(x) = h / [ 1 + 4·(x − x0)2 / w2 ] Lorentzian

Both are written so that the same value of w gives the same width at half height, which is what makes them directly comparable. Their integrated areas, however, are not the same:

AreaGaussian = h · w · √(π / 4·ln2) ≈ 1.0645 · h · w
AreaLorentzian = (π/2) · h · w ≈ 1.5708 · h · w

A Lorentzian therefore carries about 48% more area than a Gaussian of identical height and width. This is the single most important practical consequence of the line shape choice: if you are using fitted areas for quantitation, switching shapes changes your answer even when the fit looks equally good on screen.

Comparison of Gaussian, Lorentzian and 50:50 pseudo-Voigt peak profiles Three peak profiles plotted with the same center, height and full width at half height. The Lorentzian is sharper at the top and has much longer wings than the Gaussian; the 50:50 pseudo-Voigt lies between them. FWHH −4 −3 −2 −1 0 1 2 3 4 Distance from peak center, in units of FWHH 1.0 0.5 0.0 Gaussian Lorentzian Voigt (50:50)
Gaussian, Lorentzian and 50:50 pseudo-Voigt profiles plotted with identical center, height and FWHH. The middle curve is exactly Peak's Voigt shape. All three pass through the same half-height points, yet they differ substantially in the wings and near the maximum.

The table below quantifies the wings. It explains why a Lorentzian fitted to a genuinely Gaussian band tends to "steal" intensity from its neighbors several widths away, and why fitting a narrow spectral window can bias the result when the true shape is Lorentzian.

Distance from centerGaussianVoigt (50:50)Lorentzian
0.5 × FWHH50%50%50%
1 × FWHH6.3%13.1%20.0%
2 × FWHH<0.01%2.9%5.9%
3 × FWHHnegligible1.4%2.7%

Intensity remaining in the wings, as a percentage of peak height, for profiles of equal center, height and FWHH.

Voigt and Pseudo-Voigt

A true Voigt profile is the convolution of a Gaussian with a Lorentzian. It is what physics produces when a band is broadened by two independent mechanisms at once: homogeneous broadening from lifetime and dephasing, which is Lorentzian, convolved with inhomogeneous broadening from the static spread of environments and from the instrument response, which is Gaussian. A true Voigt therefore has two independent widths, one for each component, and it has no closed form in elementary functions — it has to be evaluated numerically through the complex error function.

A pseudo-Voigt replaces that convolution with a weighted sum of a Gaussian and a Lorentzian that share a single width:

pV(x) = h · [ g · G(x) + (1 − g) · L(x) ] g is the fraction Gaussian: g = 1 is a pure Gaussian, g = 0 is a pure Lorentzian, g = 0.5 is an even blend

The approximation holds up better than it might appear. Far from the center the Gaussian term has already vanished, so the sum decays as 1/(x − x0)2 — the same asymptotic form as a true Voigt, with the mixing fraction playing the role that the Lorentzian width plays in the convolution. The error is concentrated in the shoulders, roughly one to three half-widths out, where a real convolution rolls over more smoothly than a sum of two fixed-width curves can. For fitting infrared and Raman band envelopes that discrepancy sits well below the noise. Nearly every curve-fitting package uses a pseudo-Voigt for a practical reason: Levenberg-Marquardt evaluates derivatives at every iteration, and a closed-form function with analytic derivatives is far cheaper than a numerically evaluated convolution.

Areapseudo-Voigt = h · w · [ 1.0645 · g + 1.5708 · (1 − g) ] 1.0645·h·w at g = 1, 1.3176·h·w at g = 0.5, 1.5708·h·w at g = 0
The mixing fraction moves the area, not the height. At the peak center the Gaussian and Lorentzian terms are both equal to 1, so the bracket collapses to g + (1 − g) = 1 and the peak height is h whatever the fraction is. Changing the mixing fraction leaves the height untouched while changing the area by up to 48%. If you are quantifying on fitted areas, the mixing fraction is not a cosmetic shape setting — it is part of your answer.
Check the convention before copying a mixing ratio out of a paper. Some software and some publications define the mixing parameter as the fraction Lorentzian and others as the fraction Gaussian. The two are mirror images that agree only at 0.5, so a value transcribed without checking can silently invert the shape. In Peak, the Mixed shape is specified by its fraction Gaussian.

The Four Peak Shapes in Peak

ShapeDefinitionAdjustable shape parameter
GaussianPure Gaussian profileNone
LorentzianPure Lorentzian profileNone
VoigtPseudo-Voigt: an even 50:50 sum of a Gaussian and a Lorentzian of the same widthNone — the blend is fixed at 50:50
MixedThe same sum, with the proportion under your controlFraction Gaussian, which can be set or fitted

Choosing a Line Shape

Sample typeUsual best choiceReason
Low pressure gasesLorentzianMolecules are effectively isolated; rapid rotational and collisional dephasing dominates.
Mobile liquids and solutionsLorentzian, or Mixed at a low fraction GaussianMotion is fast enough that dephasing still dominates, but not completely.
Viscous liquids, polymers, glassesVoigt, or Mixed if you want to measure the blendThe two lifetimes are comparable, so both characters contribute.
Crystalline and amorphous solids, powders, gels, resinsGaussianA static statistical distribution of environments dominates.
Proteins in H2O or D2O (amide I)Gaussian, Lorentzian or Voigt — report whichAll are used in the literature; the choice changes the reported percentages, so it must be stated and applied consistently.

If you are unsure, use an empirical test: find an isolated, well resolved band elsewhere in the same spectrum, fit it with a single peak using each shape in turn, and keep the shape that leaves the flattest residual. That band is measuring the same combination of sample physics and instrument response as the overlapped region you actually care about.

The Mixed shape gives a sharper version of the same test. Fit that isolated band with Mixed and let the fraction Gaussian float. Where it settles is an empirical measurement of the blend for your sample on your instrument. Then fix that fraction for every component in the real fit — which buys the correct shape without paying an extra free parameter per peak. As the third experiment below shows, leaving the fraction free is a bad idea.

Asymmetric bands. Some features are genuinely asymmetric — a hot band adds a shoulder to the low-wavenumber flank, fluorescence backgrounds in Raman have long tails, and unresolved isotope structure distorts and broadens a band. Symmetric profiles cannot reproduce these with one component. The usual practical remedy is to model the asymmetry with two or more symmetric components and to say plainly in your report that the extra component is describing band shape rather than a distinct chemical species.

What the Fitted Parameters Mean

Center: Position

A band starts out wherever the isolated functional group would vibrate — the position tabulated in the group frequency correlation charts. The environment then moves it. Hydrogen bonding to a neighbor weakens the bond being measured, and a weaker bond vibrates more slowly, so its band moves to lower wavenumber — a red shift. Interactions that are net repulsive stiffen the bond instead and push the band the other way, a blue shift. This is precisely the effect that makes protein secondary structure analysis possible: alpha-helix, beta-sheet, beta-turn and random-coil segments hydrogen bond differently, so the amide I band of each appears at a slightly different frequency, and the measured amide I envelope is their sum.

Height and Area

Peak height depends on both concentration and absorptivity, and it is what the Beer-Lambert law is traditionally applied to. It is, however, sensitive to anything that broadens the band. If hydrogen bonding, temperature or crystallinity changes, the band broadens, the height falls, and yet the number of absorbing molecules has not changed at all. The area is conserved in that situation: every absorbing molecule still contributes what it always did, and spreading those contributions across a wider stretch of the axis does not change how many of them there are. Height was historically preferred only because it was easy to measure by hand. Peak fitting makes area just as easy to obtain, and area-based calibrations are frequently more linear as a result.

FWHH: Line Width

Of the three fitted parameters, width is the one most often ignored and the one carrying the most physical information. To a first approximation the width scales as the reciprocal of the effective lifetime: a vibration that sheds its excitation quickly gives a broad band, and one that holds onto it gives a narrow band. The very broad O-H band of water is the standard illustration, since its hydrogen bonding network offers the molecules an unusually fast route to relax. In practice this means:

  • A fitted width far outside the range you would expect is a warning that the fit is wrong, even if chi-squared looks excellent.
  • Components of the same chemical type, measured on the same instrument under the same conditions, should have similar widths. One component three times the width of its neighbors, with nothing in the chemistry to explain it, is among the most reliable signs of a bad model.
  • Because the instrument contributes to the measured width, widths are not portable between instruments or between resolution settings. Determine them for your own instrument.

How the Levenberg-Marquardt Fit Works

Levenberg-Marquardt blends two classical strategies: far from the solution it behaves like gradient descent, taking cautious steps downhill, and near the solution it behaves like the Gauss-Newton method, converging rapidly. On each iteration it perturbs the peak parameters, recomputes the synthetic spectrum, and evaluates chi-squared:

χ2 = Σ [ ymeasured(xi) − ycalculated(xi) ]2 summed over every data point in the fitted region; the term in brackets is the residual

Two consequences follow directly from that definition, and between them they account for most bad fits:

  • Chi-squared always improves when you add a peak. Each additional peak brings three more adjustable parameters — four if its shape is Mixed with the fraction floating — and more free parameters can always describe the data more closely. Goodness of fit alone therefore cannot tell you whether a peak is real.
  • The minimum found is a local minimum. Non-linear optimization goes downhill from wherever it starts. Start it in the wrong valley and it will settle confidently into the wrong answer.

It is worth counting the free parameters before you start. Eight peaks with center, height and width all floating is a 24-dimensional optimization; make them Mixed with the fraction Gaussian floating too and it becomes 32.

Experiments: When Curve Fits Fail

Almost every discussion of curve fitting has to argue in the abstract, because with a real sample nobody knows the true component parameters — that is the whole reason for fitting. The experiments below use synthetic_protein.spc, which ships with Peak and was calculated from seven known Lorentzian peaks, so the correct answer is known exactly and every fit can be graded against it.

AssignmentCenterHeightFWHH
Beta Sheet1627.90.1019.0
Beta Sheet1636.70.1019.5
Coil1645.70.2520.4
Alpha Helix1656.30.6520.5
turns1667.70.3818.7
turns1678.20.1320.1
Beta Sheet1690.80.0519.5

The peaks are spaced 8.8 to 12.6 cm-1 apart, averaging 10.5 cm-1, while their widths are 18.7 to 20.5 cm-1. Every peak is therefore much closer to its neighbors than it is wide — a heavily overlapped envelope in which no individual component is resolved.

1. How good do the starting estimates need to be?

Starting from deliberately crude estimates — every peak the same width, heights bearing no relation to the real ones — the fit recovers all seven sets of generating parameters exactly. Starting instead from values close to the answer gives an identical result. The starting heights and widths make no difference at all.

Starting positions are a different matter, but the tolerance is wider than most guidance suggests. Displacing the starting centers by a random offset and repeating thirty times at each level:

Starting centers displaced by up toFits recovering the exact answer
±5 cm-130 of 30
±6 cm-130 of 30
±7 cm-129 of 30
±10 cm-121 of 30
±15 cm-124 of 30

The tolerance is about ±6 cm-1, which is close to half the mean peak spacing — the fit recovers as long as each starting center is still nearer its own peak than its neighbor's. Displacing every center by the same amount and in the same direction, incidentally, does no harm at all even at ±15 cm-1: it is the relative arrangement that matters, not the absolute position.

The failures are a cliff, not a slope. A fit either lands on the exact answer or on a badly wrong one, with nothing in between. In one failure at ±7 cm-1, peaks swapped territory: the component labeled Alpha Helix ended up with less than half its true height, and a neighbor grew to nearly four times its own height. The reported secondary structure was 14% alpha-helix against a true 40%, and 46% turns against a true 29% — a different protein. The residual on that fit was 0.17% of the maximum absorbance. On real data with ordinary instrument noise, it would have looked clean.

2. What if the number of peaks is wrong?

This is the decision that determines whether a result means anything, because it is the only one where being wrong cannot be recovered from. Adding a component that corresponds to nothing in the sample cannot make chi-squared worse — the optimizer gains three more parameters and will use them. Removing a component the data genuinely contains forces its intensity into its neighbors, so the error does not stay local: peaks either side shift and broaden to cover the gap, and in a secondary-structure analysis that becomes a wrong percentage for structures that were modeled correctly.

Practical consequences:

  • Start from what the chemistry predicts, not from the number of wiggles you can see.
  • Use the second derivative to locate components, remembering that differentiating amplifies noise far more than it amplifies signal, so on marginal data it will sprout minima with no band behind them.
  • Add a peak only where the residual shows clear, systematic structure well above the noise.
  • The strongest argument that a component is real is that it behaves sensibly across a series of samples. A component that exists only in one fit of one spectrum is a hypothesis, not a result.

3. What if the line shape is left free?

The synthetic spectrum is pure Lorentzian, so a Mixed fit with the fraction Gaussian floating ought to return zero for every peak. Setting all seven peaks to Mixed and letting the fraction float gives:

True center / height / FWHHFitted center / height / FWHHFraction Gaussian
1627.9 / 0.10 / 19.01628.27 / 0.126 / 19.020.005
1636.7 / 0.10 / 19.51636.28 / 0.040 / 10.401.000
1645.7 / 0.25 / 20.41645.43 / 0.317 / 22.260.000
1656.3 / 0.65 / 20.51656.30 / 0.607 / 19.810.000
1667.7 / 0.38 / 18.71667.87 / 0.445 / 19.940.000
1678.2 / 0.13 / 20.11678.61 / 0.069 / 11.621.000
1690.8 / 0.05 / 19.51689.15 / 0.085 / 21.160.000

Five peaks report a fraction of zero, correctly identifying pure Lorentzian character. Two flip to the opposite extreme: the fit substitutes a narrow Gaussian of roughly half the correct width for a broad Lorentzian, and inflates the neighbors to absorb what is lost. The two that break are the least-constrained components in the model — weak peaks hemmed in by stronger ones.

The reason is that width and mixing fraction both control the wings of a peak, so the optimizer can trade one against the other with almost no penalty. Adding the fraction as a free parameter also takes the model from 21 parameters to 28. Notice too that no fraction lands anywhere between the extremes: a parameter that only ever reports its own limits is not being determined by the data in any graded way.

The residual of this wrong fit is 0.008% of the maximum absorbance — twenty times smaller than the displaced-center failure above, and far below the noise floor of any real spectrum.

The practical rule: measure the mixing fraction once on an isolated band, then fix it for every component. Fitting it alongside the widths gives you a model in which neither is determined.

4. What survives a bad fit?

Comparing that broken Mixed fit against the truth reveals a useful hierarchy:

QuantityError in the broken fit
Total fitted area0.005%
Composition percentagesup to 6 percentage points
Individual peak widthsup to 47%

The envelope pins down the total area very tightly; the decomposition is where the freedom lives. That is reassuring if you report composition percentages, since they are more robust than the parameters underneath them. It is also a warning, and the more important half of the lesson: a believable set of percentages is not evidence that the decomposition behind them is right. The fit above would pass casual review, and two of its seven components are fiction.

A uniqueness check for width

When you need to know whether the data really supports a fitted width, there is a simple test using Fixed bound handling. Fit normally and note the optimized FWHH. Then fix that component's FWHH at a series of values spanning the optimized one, refitting each time, and plot chi-squared against the fixed width. A clear minimum means the data determines that width. A flat curve means a wide range of widths fits equally well — the parameter is not determined, and often the component itself does not belong in the model.

Common Curve Fitting Mistakes

MistakeWhy it is a problemHow to avoid it
Fitting data that is too noisy Noise structure is fitted as though it were chemistry, and second-derivative peak finding stops being trustworthy. Co-add more scans. Judge the residual against the noise level and reject components that are not clearly above it.
Using too many components Chi-squared always improves, so the fit looks superb while most of the peaks correspond to nothing in the sample. Start with the number the chemistry predicts and add peaks only where the residual demands one.
Fitting through a sloping or curved baseline The optimizer adds phantom peaks at the edges to accommodate the slope, changing the areas of the real peaks. Baseline correct first, over a region wide enough to include flat baseline on both sides of the envelope.
Truncating the band Cutting through the wings, particularly of Lorentzian components, distorts widths and areas. Zoom to include the whole envelope plus flat baseline either side before launching the fit.
Components whose widths differ wildly for no stated reason Usually means the widths were left unconstrained and absorbed errors elsewhere in the model. Determine a realistic width from an isolated band and bound the components to a narrow range around it.
Heavy smoothing before fitting Narrow peaks can be flattened out of existence, and the smoothing function is convolved into every fitted width. Smooth gently or not at all, and report the smoothing applied along with the fitted widths.
Floating the mixing fraction along with the width The two are strongly correlated, so the fit converges to a solution in which neither is determined by the data. Determine the fraction Gaussian once on an isolated band, then fix it across the model.
Not stating the line shape used Areas differ by roughly 48% between a Lorentzian and a Gaussian of the same height and width, so results are not comparable between studies. Choose the shape from the physical state of the sample, verify it on an isolated band, and state it in the report.
Reporting only the fitted components Readers cannot judge the quality of the fit or of the underlying data. Show the original unsmoothed data, the components, their sum, and the residual, plus a goodness-of-fit figure.
Treating a converged fit as a proven answer The algorithm always converges to something. Convergence is not evidence. Test uniqueness, repeat on replicate samples, and corroborate with an independent measurement.

References and Further Reading

  • K. Levenberg, "A method for the solution of certain non-linear problems in least squares," Quarterly of Applied Mathematics 2, 164–168 (1944).
  • D. W. Marquardt, "An algorithm for least-squares estimation of nonlinear parameters," Journal of the Society for Industrial and Applied Mathematics 11, 431–441 (1963).
  • M. Bradley, "Curve Fitting in Raman and IR Spectroscopy: Basic Theory of Line Shapes and Applications," Thermo Fisher Scientific Application Note 50733 (2007).
  • G. H. Major, N. Fairley, P. M. A. Sherwood, M. R. Linford, J. Terry, V. Fernandez and K. Artyushkova, "Practical guide for curve fitting in x-ray photoelectron spectroscopy," Journal of Vacuum Science & Technology A 38, 061203 (2020). doi:10.1116/6.0000377
  • P. Pelikán, M. Čeppan and M. Liška, Applications of Numerical Methods in Molecular Spectroscopy, CRC Press (1993), Chapter 2 — mathematical forms of the common line shape functions.
  • W. G. Rothschild, Dynamics of Molecular Liquids, John Wiley and Sons (1984) — the origin of line widths in condensed phases.
  • D. M. Byler and H. Susi, "Examination of the secondary structure of proteins by deconvolved FTIR spectra," Biopolymers 25, 469–487 (1986) — the classic amide I curve fitting method.
  • A. Barth, "Infrared spectroscopy of proteins," Biochimica et Biophysica Acta 1767, 1073–1101 (2007) — amide I band assignments.
  • M. Jackson and H. H. Mantsch, "The use and misuse of FTIR spectroscopy in the determination of protein structure," Critical Reviews in Biochemistry and Molecular Biology 30, 95–120 (1995).
  • A. Savitzky and M. J. E. Golay, "Smoothing and differentiation of data by simplified least squares procedures," Analytical Chemistry 36, 1627–1639 (1964).
  • ISO 19830 — the standard covering what should be recorded and disclosed about a peak fit. Written for XPS, but a useful template for reporting any curve fit.

Related Pages