|
Layers
Diffusion in heterogeneous environments
|
Fits the 3-layer model to RTI data to determine alpha, theta, and kappa of the SP layer. More...
#include <stdio.h>#include <stdlib.h>#include <getopt.h>#include <string.h>#include <strings.h>#include <time.h>#include <gsl/gsl_multimin.h>#include "header.h"
Go to the source code of this file.
Data Structures | |
| struct | param_struct_type |
| Typedef for struct for passing parameters and arrays to mse function. More... | |
Functions | |
| double | calc_mse_fit_layer (const gsl_vector *x, void *params) |
| Mean squared error function for simplex fitting. More... | |
| int | main (int argc, char *argv[]) |
| Main program. | |
Fits the 3-layer model to RTI data to determine alpha, theta, and kappa of the SP layer.
Usage:
fit-layer [options] \<input_file\>
where <input_file> is the name of the input data file. The output file will have the same basename as the input file but will have the extension '.dat'. The input file should not have the extension '.dat'.
To get a list of options, run fit-layer with no input filename.
The input data file consists of:
Notes:
Definition in file fit-layer.c.
| double calc_mse_fit_layer | ( | const gsl_vector * | x, |
| void * | params | ||
| ) |
Mean squared error function for simplex fitting.
Calls calc_diffusion_curve_layer_fit_layer(), which calculates the diffusion curve from the layer model. Calculates and returns the MSE between the model curve and the data from experiment.
Note that the data typically has about 1000 samples, but the model curve generally has several thousand points. In order to calculate the mean squared error, the model curve is downsampled to the same number of sample points as in the data.
| [in,out] | x | Vector of parameters to fit (alpha, theta, kappa of SP) |
| [in,out] | params | Struct of parameters and arrays (e.g., geometry of environment, nt, time array, data array, model curve array) |
Definition at line 116 of file fit-layer.c.


1.8.11