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

#include <DecayFit.h>

Inheritance diagram for DecayFit:
DecayFit24 DecayFit25 DecayFit26

Static Public Member Functions

static int modelf (double *param, double *irf, double *bg, int Nchannels, double dt, double *corrections, double *mfunction)
 Function to compute a model fluorescence decay.
 
static double targetf (double *x, void *pv)
 Target function (to minimize)
 
static double fit (double *x, short *fixed, MParam *p)
 
static void correct_input (double *x, double *xm, LVDoubleArray *corrections, int return_r)
 

Member Function Documentation

◆ correct_input()

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

Correct input parameters and compute values

Parameters
x[in,out]input output array (see implementations of derived classes)
xm[in,out]array that will contain the corrected parameters
corrections[in]array with correction parameters
return_r[in]if set to true (positive) computes the anisotropy and returns the scatter corrected and the signal (no scatter correction) anisotropy and writes the values to the input/output vector x.

◆ fit()

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

Function that optimizes parameters of model23 to data.

Parameters
x[in,out]a vector of length that that contains the starting parameters
fixedan array that specifies if a parameter is optimized. If a value is set to 1, the parameter is optimized.
pan instance of MParam that contains all relevant information
Returns

◆ modelf()

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

Function to compute a model fluorescence decay.

Parameters
[in]paramarray containing the model parameters
[in]irfinstrument response function in Jordi format (parallel, perpendicular)
bg[in]background pattern in Jordi format (parallel, perpendicular)
Nchannels[in]number of channels (half the length of the Jordi arrays)
dt[in]time difference between two consecutive counting channels
corrections[in]array with corrections (details see implementations)
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
integer For reporting failures (default 0)

◆ targetf()

static double DecayFit::targetf ( double * x,
void * pv )
inlinestatic

Target function (to minimize)

Computes the model function and returns a score that quantifies the discrepancy between the data and the model.

Parameters
x[in,out]a vector of length that that contains the model parameters
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: