18using namespace CurveFitting;
20using namespace Kernel;
24using namespace CurveFitting::MuonHelper;
29 declareParameter(
"Asymmetry", 1.0,
"a scaling parameter for the overall asymmetry");
30 declareParameter(
"CharField", 1.0,
"the characteristic field");
37 for (
size_t i = 0; i < nData; i++) {
38 auto A_z =
getAz(xValues[i], charField);
39 out[i] = asym * (1 - A_z);
46 for (
size_t i = 0; i < nData; i++) {
47 double diffasym = 1 -
getAz(xValues[i], charField);
48 double diffAz =
getDiffAz(xValues[i], charField);
49 if (!std::isfinite(diffasym)) {
52 out->
set(i, 0, diffasym);
53 out->
set(i, 1, diffAz);
#define DECLARE_FUNCTION(classname)
Macro for declaring a new type of function to be used with the FunctionFactory.
Represents the Jacobian in IFitFunction::functionDeriv.
virtual void set(size_t iY, size_t iP, double value)=0
Set a value to a Jacobian matrix element.
double getParameter(size_t i) const override
Get i-th parameter.
Provide Decoupling of asymmetry in the ordered state of a powdered magnet for fitting function interf...
void functionDeriv1D(API::Jacobian *out, const double *xValues, const size_t nData) override
Derivatives of function with respect to active parameters.
void function1D(double *out, const double *xValues, const size_t nData) const override
Function you want to fit to.
double MANTID_CURVEFITTING_DLL getDiffAz(double xValue, const double charField)
double MANTID_CURVEFITTING_DLL getAz(double xValue, const double charField)