Skip to content
Session 5: Fitting with Convolution

Session 5: Fitting with Convolution

In this session we fit data with a curve computed as the convolution of a theoretical model and an instrumental resolution function.

Basic example

We fit gly275 (a data file at 275 K) with the Fourier transform of a stretched exponential, convoluted with the resolution from gly180.

The theory is kwwc(frequency, p1, p2) — the cosine Fourier transform of exp(−(time/p1)^p2). Note: the dummy variable t is frequency here, not time.

Command Action
? > fl gly180 Load the resolution file
0 > fl gly275 Load the data file
1 > cc p0*conv(kwwc(t,p1,p2)) Create the fit curve
2 > cf Fit without convolution (baseline check)
2 > g2 Switch to a linear-log plot window
2 > 1,2 p 7 Plot data and fit
1,2 > 2 cv 0 Tell curve file 2 to use resolution file 0
2 > cf Fit again, now with convolution
2 > 0:2 p 7 Plot resolution, data and fit together

Generic curve form

The most complete form of a fit curve in Frida is:

p0 + p1*resol(p2) + p3*conv( theory(t,p4,p5,...), p2 )
  • p0 — flat background. For performance, keep it outside the convolution.
  • p1*resol(p2) — Dirac delta peak at shift p2. When a resolution file is set, resol(p2) reproduces that resolution function. The shift argument is optional (default 0).
  • p3*conv(..., p2) — convolution of the theory with the resolution, shifted by p2. The shift argument is optional (default 0).