|
Layers
Diffusion in heterogeneous environments
|
Functions for fitting the homogeneous model to the data (traditional fit) to obtain the apparent parameters and the characteristic curve. More...
#include "header.h"
Go to the source code of this file.
Functions | |
| double | calc_mse_rti (const gsl_vector *x, void *params) |
| Mean squared error function for simplex fitting. More... | |
| void | rti_theory (int nt, double spdist, double samplitude, double sdelay, double sduration, double kappa, double dfree, double alpha, double theta, double *t, double *p_theory) |
| Calculates RTI data for diffusion in an isotropic, homogeneous environment (direct calculation from an equation) More... | |
Functions for fitting the homogeneous model to the data (traditional fit) to obtain the apparent parameters and the characteristic curve.
Definition in file rti-theory.c.
| double calc_mse_rti | ( | const gsl_vector * | x, |
| void * | params | ||
| ) |
Mean squared error function for simplex fitting.
The 3layer program uses a minimization function in GSL to minimize the mean squared error between the diffusion curve calculated from the multilayer model and a diffusion curve calculated from a formula that assumes an isotropic homogeneous environment. It does so to calculate the apparent parameters and characteristic diffusion curve (for comparison purposes).
This function calculates the mean squared error between the two curves. The GSL minimization routine needs the first parameter to be a vector of doubles which represent the parameters to be fit and the second parameter to be a pointer to parameters of the function to fit (rti_theory).
The second parameter actually points to a struct of parameters. The characteristic curve calculated from rti_theory is stored in the p_theory array of this struct.
| [in] | x | Vector of doubles representing parameters to fit (alpha and theta) |
| [in,out] | params | Vector of parameters needed by rti_theory |
Definition at line 42 of file rti-theory.c.


| void rti_theory | ( | int | nt, |
| double | spdist, | ||
| double | samplitude, | ||
| double | sdelay, | ||
| double | sduration, | ||
| double | kappa, | ||
| double | dfree, | ||
| double | alpha, | ||
| double | theta, | ||
| double * | t, | ||
| double * | p_theory | ||
| ) |
Calculates RTI data for diffusion in an isotropic, homogeneous environment (direct calculation from an equation)
| [in] | nt | Number of time points of calculation |
| [in] | spdist | Distance between source and probe |
| [in] | samplitude | Amplitude of source |
| [in] | sdelay | Source delay (time before source starts) |
| [in] | sduration | Duration of source |
| [in] | kappa | Nonspecific clearance factor |
| [in] | dfree | Free diffusion coefficient |
| [in] | alpha | Extracellular volume fraction |
| [in] | theta | Permeability |
| [in] | t | Time array |
| [out] | p_theory | Probe array (concentration as a function of time) |
Definition at line 88 of file rti-theory.c.

1.8.11