13#include <gsl/gsl_sf_erf.h>
17using namespace CurveFitting;
19using namespace Kernel;
26 declareParameter(
"A", 2000.0,
"Half value at minus infinity minus half value at plus infinity");
27 declareParameter(
"B", 50.0,
"Mid x value");
28 declareParameter(
"C", 6.0,
"Width parameter");
29 declareParameter(
"D", 0.0,
"Minimum value - must not be negative");
38 for (
size_t i = 0; i < nData; i++) {
39 double x = xValues[i];
40 out[i] = gA * gsl_sf_erfc((gB -
x) / gC) + gD;
44 for (
size_t i = 0; i < nData; i++) {
double value
The value of the point.
#define DECLARE_FUNCTION(classname)
Macro for declaring a new type of function to be used with the FunctionFactory.
void setParameter(size_t, const double &value, bool explicitlySet=true) override
Set i-th parameter.
std::string parameterName(size_t i) const override
Returns the name of parameter i.
double getParameter(size_t i) const override
Get i-th parameter.
Provide Errore function erfc()for calibrating the end of a tube.
void setActiveParameter(size_t i, double value) override
overwrite IFunction base class methods
void function1D(double *out, const double *xValues, const size_t nData) const override
Function you want to fit to.