tttrlib
A library for time-tagged time resolved data
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
DecayFit24 Class Reference

#include <DecayFit24.h>

Inheritance diagram for DecayFit24:
DecayFit

Static Public Member Functions

static int modelf (double *param, double *irf, double *bg, int Nchannels, double dt, double *corrections, double *mfunction)
 Bi-exponential model function.
 
static double targetf (double *x, void *pv)
 Target function (to minimize) for fit23.
 
static double fit (double *x, short *fixed, MParam *p)
 
static void correct_input (double *x, double *xm, LVDoubleArray *corrections, int return_r)
 Correct input parameters and compute anisotropy for fit24.
 

Member Function Documentation

◆ correct_input()

static void DecayFit24::correct_input ( double * x,
double * xm,
LVDoubleArray * corrections,
int return_r )
static

Correct input parameters and compute anisotropy for fit24.

limits (0.001 < A2 < 0.999), (0.001 < gamma < 0.999), (tau1 > 0), (tau2 > 0), background > 0 (called offset in other places)

Parameters
x[in,out][0] tau1, [1] gamma [2] tau2, [3] A2, [4] background, [5] BIFL scatter fit? (flag, not used), [6] anisotropy r (scatter corrected, output), [7] anisotropy (no scatter correction, output)
xm[out]array for corrected parameters (amplied range)
corrections[1] g factor, [2] l1, [3] l3
return_rif true computes the anisotropy.
Returns

◆ fit()

static double DecayFit24::fit ( double * x,
short * fixed,
MParam * p )
static

Fit a bi-exponential decay model

This function fits a bi-exponential decay model to two decays that are stacked using global parameters for the lifetimes and amplitudes.

Bi-exponential model function with two fluorescence lifetimes tau1, tau2 and amplitude of the second lifetime A2, fraction scattered light gamma, and a constant offset. A2 (A1 + A2 = 1)

The model function does not describe anisotropy. The decays passed as a Jordi format are treated identical in first and the second channel of the stacked arrays.

The anisotropy is computed assuming that the first and the second part of the Jordi input arrays are for parallel and perpendicular using the correction array of the attribute p of the type MParam.

Parameters
[in,out]xarray containing the parameters of the model [0] tau1, [1] gamma, [2] tau2, [3] A2, [4] offset, [5] BIFL scatter fit? (flag) - if smaller than 0 uses soft bifl scatter fit (seems to be unused) [6] r Scatter (output only), [7] r Experimental (output only)
fixedan array at least of length 5 for the parameters [0] tau1, [1] gamma, [2] tau2, [3] A2, [4] offset. If a value is not set to fixed the parameter is optimized.
pan instance of MParam that contains relevant information. Here, experimental data, the instrument response function, and the background decay are used.
Returns
Quality parameter 2I*

◆ modelf()

static int DecayFit24::modelf ( double * param,
double * irf,
double * bg,
int Nchannels,
double dt,
double * corrections,
double * mfunction )
static

Bi-exponential model function.

Bi-exponential model function with two fluorescence lifetimes tau1, tau2 and amplitude of the second lifetime A2, fraction scattered light gamma, and a constant offset. A2 (A1 + A2 = 1)

The model function does not describe anisotropy. The decays passed as a Jordi format are treated identical in first and the second channel of the stacked arrays.

mfunction[i] * (1. - gamma) / sum_m + bg[i] * gamma / sum_s + offset

Parameters
[in]paramarray containing the parameters of the model [0] tau1, [1] gamma, [2] tau2, [3] A2, [4] offset
[in]irfinstrument response function in Jordi format
bg[in]background pattern in Jordi format
Nchannels[in]number of channels (half the length of the Jordi arrays)
dt[in]time difference between two consecutive counting channels
corrections[in][0] excitation period, [1] unused, [2] unused, [3] unused, [4] convolution stop channel.
mfunction[out]output array of the computed decay in Jordi format. The output array has to have twice the number of channels. It needs to be allocated by beforehand.
Returns

◆ targetf()

static double DecayFit24::targetf ( double * x,
void * pv )
static

Target function (to minimize) for fit23.

Parameters
[in]xarray containing the parameters of the model [0] tau1, [1] gamma, [2] tau2, [3] A2, [4] offset
pv[in]a pointer to a MParam structure that contains the data and a set of corrections.
Returns
a normalized chi2

The documentation for this class was generated from the following file: