|
TPCCLIB
|
Simulation of dispersion. More...
#include "tpcclibConfig.h"#include <stdio.h>#include <stdlib.h>#include <math.h>#include <time.h>#include <string.h>#include "tpccm.h"Go to the source code of this file.
Functions | |
| int | simDispersion (double *x, double *y, const int n, const double tau1, const double tau2, double *tmp) |
| int | corDispersion (double *x, double *y, const int n, const double tau, double *tmp) |
| int | simTTM (double *t, double *c0, const int n, const double k, const int cn, double *cout) |
| int | simTTM_i (double *t, double *c0i, const int n, const double k, const int cn, double *cout) |
Simulation of dispersion.
Definition in file simdispersion.c.
| int corDispersion | ( | double * | x, |
| double * | y, | ||
| const int | n, | ||
| const double | tau, | ||
| double * | tmp ) |
Correct time-activity curve for the effect of dispersion.
Data must be noise-free and have very short sampling intervals. The units of rate constants must be related to the TAC time units; 1/min and min, or 1/sec and sec.
| x | Array of sample times; must be in increasing order and >=0. |
| y | Array of sample values, which will be replaced here by dispersion corrected values. |
| n | Nr of samples. |
| tau | Dispersion time constant (zero if no dispersion); in same time unit as sample times. |
| tmp | Array for temporary data, for at least n samples; enter NULL to let function to allocate and free the temporary space. |
Definition at line 88 of file simdispersion.c.
| int simDispersion | ( | double * | x, |
| double * | y, | ||
| const int | n, | ||
| const double | tau1, | ||
| const double | tau2, | ||
| double * | tmp ) |
Simulate the effect of dispersion on a time-activity curve.
The units of rate constants must be related to the TAC time units; 1/min and min, or 1/sec and sec.
| x | Array of sample times; must be in increasing order. |
| y | Array of sample values, which will be replaced here by dispersion added values. |
| n | Nr of samples. |
| tau1 | First dispersion time constant (zero if no dispersion); in same time unit as sample times. |
| tau2 | 2nd dispersion time constant (zero if no dispersion); in same time unit as sample times. |
| tmp | Array for temporary data, for at least n samples; enter NULL to let function to allocate and free the temporary space. |
Definition at line 26 of file simdispersion.c.
| int simTTM | ( | double * | t, |
| double * | c0, | ||
| const int | n, | ||
| const double | k, | ||
| const int | cn, | ||
| double * | cout ) |
Simulate output of n-compartmental transit-time model, at input TAC sample times.
The units of rate constant must be related to the time unit; 1/min and min, or 1/sec and sec.
| t | Array of time values. |
| c0 | Array of input values. |
| n | Number of values in TACs. |
| k | Rate constant of the model. |
| cn | Number of compartments (cn>0). |
| cout | Pointer for TAC array to be simulated; must be allocated. |
Definition at line 144 of file simdispersion.c.
| int simTTM_i | ( | double * | t, |
| double * | c0i, | ||
| const int | n, | ||
| const double | k, | ||
| const int | cn, | ||
| double * | cout ) |
Simulate output of n-compartmental transit-time model, at input TAC sample times.
This version uses integral of input function, enabling user to fully control the calculation of integral, which is more precise when input is based on an integrable mathematical function.
The units of rate constant must be related to the time unit; 1/min and min, or 1/sec and sec.
| t | Array of time values. |
| c0i | Array of AUC 0-t of input function. |
| n | Number of values in TACs. |
| k | Rate constant of the model. |
| cn | Number of compartments (cn>0). |
| cout | Pointer for TAC array to be simulated; must be allocated. |
Definition at line 227 of file simdispersion.c.