The repo consists of two sets of Matlab routines for fitting transient absorption data.
Iterative fitting of a single free induction decay time trace into a sum of exponential decay-modulated (co)sinusoids. The routine uses starting point re-initialization to find a close fit in a much faster and more reliable way than conventional single-starting approach.
Fitting to a model of the type,
The background removal (multi-exponential decay type) may be carried out using the global fitting approach (see following section).
Global fitting of multi-exponential decay relaxation dynamics with a Gaussian impulse response.
Goal: achieve small confidence interval on the evaluation of parameters (e.g. time constants) by fitting simultaneously over a large number of traces.
Fitting to a model of the type,
Operation steps:
-
Construct fitting model (e.g. DecayModel or use a model constructor like
constructExpDecayModel
). -
Single-trace fitting to provide feasible initial guesses for the fitting parameters (esp. time constants).
Tool to use: Matlab's cftool interactive interface
-
Construct initial guesses and (upper and/or lower) bounds, if necessary, for every fitting parameter.
function to use:
fvconstruct
-
Construct the minimizer by plugging the model, initial guesses (and bounds) into it.
minimizer of choice for least-square problems: Levenberg-Marquardt, trust region reflective
functions to use: lsqcurvefit, lsqnonlin, etc.
-
Run the minimizer and check for results numerically or graphically. Modify initial guesses, bounds, fitting options, if needed, to get a better fit.
-
Calculate the 95% confidence intervals (CIs) for all fitting parameters.
function to use:
nlparci
(need the Jacobian matrix obtained from the minimizer) -
Distribute the fitted parameters and CIs.
function to use:
vardist
-
Construct dictionary/structure to store fitted parameters and CIs.
function to use:
dictConstructor