Skip to content

Fit

Interactive curve fitting for Linux, Windows and macOS

User guide

Curve type

2 br. Pseudo-Voigt

This software's choice — A decision made by this software rather than by the field's sources; the explanation says why it was made.

A pseudo-Voigt peak with an independent width and Gaussian-Lorentzian mix on each side of its maximum.

Left of x0 it uses sigma and eta, right of x0 it uses sigmaright and etaright; both sides reach the height A at x0, so the curve is continuous there. A is the peak height, not its area.

Giving each branch its own shape follows strongly asymmetric peaks more freely than Asym. Pseudo-Voigt, at the price of two more parameters.

Limitations

Asym. Pseudo-Voigt

This software's choice — A decision made by this software rather than by the field's sources; the explanation says why it was made.

A pseudo-Voigt peak made asymmetric by giving its two sides different widths, sigma + deltasigma on the right and sigma - deltasigma on the left.

Each side is (1 - eta) Gaussian + eta Lorentzian with the width of that side, both scaled to height A at x0. Unlike Pseudo-Voigt, A here is the peak height, not its area.

Splitting the width is an empirical way to follow an asymmetric peak; this software chose that form, it is not taken from a published profile function.

Limitations

Constant background

Convention — Common practice or a guideline in the field, not a rule its sources require.

A flat background of level b0 under the peaks of each fit interval.

b0 everywhere. The simplest background there is: right for data whose baseline does not change across the interval.

It is a background, not a peak: the model has one per fit interval, under the peaks, fitted with them and never removed when the number of curves is reduced. It is added with Model > Background > Curve, and the automatic run adds a quadratic one to a model that has none.

xr is the start of the fit interval, so b0 is the level of the background there. It is set when the curve is placed and is not fitted.

Limitations

Sources

Doniach-Sunjic

Canonical — Stated by the field's authoritative sources, which the explanation quotes and cites.

An asymmetric photoemission line of metals: a Lorentzian of half-width sigma skewed by the singularity index alpha.

A cos(pi alpha / 2 + (1 - alpha) arctan((x - x0) / sigma)) / (sigma^2 + (x - x0)^2)^((1 - alpha) / 2). alpha = 0 gives a Lorentzian; larger alpha gives a heavier tail on one side.

It describes core-level X-ray photoemission lines of metals, where screening by conduction electrons makes the line asymmetric.

I(E) = cos(pi alpha / 2 + (1 - alpha) arctan(E / gamma)) / (E^2 + gamma^2)^((1 - alpha) / 2)

Limitations

Sources

Exponential background

Convention — Common practice or a guideline in the field, not a rule its sources require.

An exponentially decaying background: level b0 at the start of the interval, falling by a factor e every tau.

b0 exp(-(x - xr) / tau). The shape of a low-angle tail - scattering from air and from the direct beam, strongest at the smallest angles - and of any baseline that relaxes at a constant rate. A negative tau makes it rise instead.

It is a background, not a peak: the model has one per fit interval, fitted with the peaks and never removed when the number of curves is reduced. It is added with Model > Background > Curve. xr is the start of the fit interval and is not fitted.

Limitations

Sources

Exponentially Modified Gaussian

Canonical — Stated by the field's authoritative sources, which the explanation quotes and cites.

A Gaussian convolved with a one-sided exponential decay, giving a peak with a tail of time constant tau.

A Gaussian of standard deviation sigma centred at x0, convolved with an exponential of time constant tau, and scaled by A.

It is the classic model of chromatographic peak tailing, where the detector or column adds an exponential lag to a Gaussian band.

f(t) = Gaussian(t; t_G, sigma) convolved with exp(-t / tau) / tau

Limitations

Sources

Gaussian

Canonical — Stated by the field's authoritative sources, which the explanation quotes and cites.

A symmetric bell-shaped peak whose area is A, centred at x0, with standard deviation sigma.

The normal (Gaussian) density scaled by A: A / (sigma sqrt(2 pi)) exp(-(x - x0)^2 / (2 sigma^2)). A is therefore the area under the peak, not its height; the height is A / (sigma sqrt(2 pi)).

x0 is the position of the maximum and sigma the standard deviation; the full width at half maximum is 2 sqrt(2 ln 2) sigma, about 2.355 sigma.

It is the shape of broadening made of many small independent contributions, such as instrumental resolution.

f(x) = exp(-(x - mu)^2 / (2 sigma^2)) / (sigma sqrt(2 pi))

Limitations

Sources

Linear background

Convention — Common practice or a guideline in the field, not a rule its sources require.

A straight-line background, level b0 at the start of the interval and slope b1.

b0 + b1 (x - xr). For a baseline that rises or falls steadily across the fit interval.

It is a background, not a peak: the model has one per fit interval, under the peaks, fitted with them and never removed when the number of curves is reduced. It is added with Model > Background > Curve, and the automatic run adds a quadratic one to a model that has none.

xr is the start of the fit interval, so b0 is the level of the background there. It is set when the curve is placed and is not fitted.

Limitations

Sources

Lorentzian

Canonical — Stated by the field's authoritative sources, which the explanation quotes and cites.

A symmetric peak with heavy tails, whose area is A, centred at x0, with full width at half maximum sigma.

The Cauchy (Lorentzian) density scaled by A: A (2 / (pi sigma)) / (1 + (2 (x - x0) / sigma)^2). A is the area and sigma here is the full width at half maximum, not a standard deviation.

It is the natural line shape of a damped oscillator and of lifetime broadening, and in diffraction the shape small crystallite size tends to give.

f(x) = 1 / (pi s (1 + ((x - t) / s)^2))

Limitations

Sources

Moffat

Canonical — Stated by the field's authoritative sources, which the explanation quotes and cites.

A symmetric peak of height A with core width sigma and power-law wings set by m, used for stellar images.

A / (1 + ((x - x0) / sigma)^2)^m. m = 1 is a Lorentzian; larger m gives weaker wings.

It was introduced for the point-spread function of stars, whose wings are heavier than a Gaussian predicts.

I(r) = I0 (1 + (r / alpha)^2)^(-beta)

Limitations

Sources

Pearson VII

Canonical — Stated by the field's authoritative sources, which the explanation quotes and cites.

A symmetric peak of height A and full width at half maximum sigma, whose tail weight m runs from Lorentzian to Gaussian.

A / (1 + (2^(1/m) - 1) (2 (x - x0) / sigma)^2)^m. With this scaling sigma is exactly the full width at half maximum for every m.

m = 1 gives a Lorentzian; as m grows the wings shrink and the shape tends to a Gaussian. It is widely used for X-ray diffraction peaks.

y = A / (1 + (2^(1/m) - 1) (2 (x - x0) / w)^2)^m

Limitations

Sources

Power-law background

Convention — Common practice or a guideline in the field, not a rule its sources require.

A background that changes as a power of x: level b0 at the start of the interval, exponent p.

b0 (x / xr)^p. With p below zero it falls, more slowly than an exponential over a long stretch; with p above zero it rises. The form small-angle scattering takes, and a common description of a slowly decaying low-angle tail.

It is a background, not a peak: the model has one per fit interval, fitted with the peaks and never removed when the number of curves is reduced. It is added with Model > Background > Curve. xr is the start of the fit interval and is not fitted.

Limitations

Sources

Pseudo-Voigt

Canonical — Stated by the field's authoritative sources, which the explanation quotes and cites.

A weighted sum of a Gaussian and a Lorentzian with one shared width, used as a fast stand-in for the Voigt profile.

A ((1 - eta) G(x) + eta L(x)), where G and L are the area-normalised Gaussian and Lorentzian with the same full width at half maximum sigma. A is the area.

eta, between 0 and 1, sets the mix: 0 is a pure Gaussian and 1 a pure Lorentzian. It is the standard peak shape of powder-diffraction profile fitting.

pV = eta L + (1 - eta) G

Limitations

Sources

Quadratic background

Convention — Common practice or a guideline in the field, not a rule its sources require.

A parabolic background: level b0 at the start of the interval, slope b1 and curvature b2.

b0 + b1 (x - xr) + b2 (x - xr)^2. It follows a baseline that bends once across the fit interval, and fits a straight or flat one with b2 near zero - which is why it is the one the automatic run adds.

It is a background, not a peak: the model has one per fit interval, under the peaks, fitted with them and never removed when the number of curves is reduced. It is added with Model > Background > Curve, and the automatic run adds a quadratic one to a model that has none.

xr is the start of the fit interval, so b0 is the level of the background there. It is set when the curve is placed and is not fitted.

Limitations

Sources

Skewed Gaussian

Canonical — Stated by the field's authoritative sources, which the explanation quotes and cites.

A Gaussian made asymmetric by the shape parameter beta, following the skew-normal distribution.

A Gaussian density of scale sigma at x0, multiplied by (1 + erf(beta (x - x0) / (sigma sqrt 2))) and scaled by A. beta = 0 gives the ordinary Gaussian; positive beta skews the peak to the right.

It adds asymmetry with one parameter while keeping Gaussian tails.

f(x) = 2 phi(x) Phi(alpha x)

Limitations

Sources

Step (erf)

Canonical — Stated by the field's authoritative sources, which the explanation quotes and cites.

A smooth step of height A centred at x0, whose sharpness is set by sigma.

(A / 2) (1 + erf((x - x0) / (sigma sqrt 2))): the integral of a Gaussian, rising from 0 to A. sigma is the width of the transition.

Use it for an edge or a change of level rather than a peak, for example an absorption edge or a baseline shift.

erf z = (2 / sqrt(pi)) integral from 0 to z of exp(-t^2) dt

Limitations

Sources

User Defined

This software's choice — A decision made by this software rather than by the field's sources; the explanation says why it was made.

A curve whose formula you type yourself, with parameters named in that formula.

The expression is parsed and evaluated as written; every name in it other than x becomes a parameter the fit can vary.

Use it for a model the built-in types do not provide, without writing a module.

Limitations

Voigt

Canonical — Stated by the field's authoritative sources, which the explanation quotes and cites.

The convolution of a Gaussian of width sigma with a Lorentzian of half-width gamma, scaled by A.

The exact profile of a peak broadened by two independent mechanisms at once: a Gaussian one (instrument, strain) with standard deviation sigma and a Lorentzian one (lifetime, size) with half-width gamma.

It is what Pseudo-Voigt approximates; use it when the two widths matter separately.

U(x, t) + i V(x, t) = sqrt(pi / (4 t)) exp(z^2) erfc(z), z = (1 - i x) / (2 sqrt(t))

Limitations

Sources