13using namespace CurveFitting;
15using namespace Kernel;
22 declareParameter(
"A", 0.2,
"Amplitude at time 0");
23 declareParameter(
"Delta", 0.2,
"StaticKuboToyabe decay rate");
24 declareParameter(
"Lambda", 0.2,
"Exponential decay rate");
25 declareParameter(
"Beta", 0.2,
"Stretching Exponent");
34 const double C1 = 2.0 / 3;
35 const double C2 = 1.0 / 3;
37 for (
size_t i = 0; i < nData; i++) {
38 double x = xValues[i];
39 double DXSquared = pow(D *
x, 2);
40 double stretchExp = exp(-pow(L *
x, B));
41 out[i] = A * (exp(-DXSquared / 2) * (1 - DXSquared) * C1 + C2) * stretchExp;
#define DECLARE_FUNCTION(classname)
Macro for declaring a new type of function to be used with the FunctionFactory.
double getParameter(size_t i) const override
Get i-th parameter.
StaticKuboToyabeTimesStretchExp fitting function.
void function1D(double *out, const double *xValues, const size_t nData) const override
Function you want to fit to.