17using namespace CurveFitting;
19using namespace Kernel;
26 declareParameter(
"Scaling", 1.0,
"coefficient for scaling");
27 declareParameter(
"CriticalTemp", 0.01,
"coefficient for critical temperature");
28 declareParameter(
"Exponent", 1.0,
"coefficient for critical exponent");
29 declareParameter(
"Background1", 0.0,
"coefficient for non-critical background when x < Critical Temperature");
30 declareParameter(
"Background2", 0.0,
"coefficient for non-critical background when x > Critical Temperature");
31 declareAttribute(
"Delta",
Attribute(0.01));
43 for (
size_t i = 0; i < nData; i++) {
44 auto denom = pow(
fabs(xValues[i] - Tc), Exp);
45 if (xValues[i] + Delta < Tc || xValues[i] - Delta > Tc) {
46 if (xValues[i] < Tc) {
47 out[i] = Bg1 + Scale / denom;
49 out[i] = Bg2 + Scale / denom;
#define DECLARE_FUNCTION(classname)
Macro for declaring a new type of function to be used with the FunctionFactory.
Mantid::API::IFunction::Attribute Attribute
double asDouble() const
Returns double value if attribute is a double, throws exception otherwise.
virtual Attribute getAttribute(const std::string &name) const
Return a value of attribute attName.
double getParameter(size_t i) const override
Get i-th parameter.
Provide Critical peak of relaxation rate for fitting interface to IFunction.
void function1D(double *out, const double *xValues, const size_t nData) const override
Function you want to fit to.