Mantid
Loading...
Searching...
No Matches
AsymmetricPearsonVII.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2022 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
10#include "MantidCurveFitting/DllConfig.h"
11
12namespace Mantid {
13namespace CurveFitting {
14namespace Functions {
15
39class MANTID_CURVEFITTING_DLL AsymmetricPearsonVII : public API::IPeakFunction {
40public:
43
45 double height() const override;
46 double centre() const override;
47 double fwhm() const override;
48 double leftShape() const;
49 double rightShape() const;
50
51 void setCentre(const double newCentre) override;
52 void setHeight(const double newHight) override;
53 void setFwhm(const double newFwhm) override;
54 void setLeftShape(const double newLeftShape);
55 void setRightShape(const double newRightShape);
56
58 std::string name() const override { return "AsymmetricPearsonVII"; }
59 const std::string category() const override { return "XrayDiffraction"; }
60
61 double activeParameter(size_t i) const override;
62 void setActiveParameter(size_t i, double value) override;
63
64 double getPearsonVII(double peak_height, double offset, double weight, double m) const;
65 double getPearsonVIIDerivWRTh(double offset, double weight, double m) const;
66 double getPearsonVIIDerivWRTc(double peak_height, double offset, double weight, double m) const;
67 double getPearsonVIIDerivWRTw(double peak_height, double offset, double weight, double m) const;
68 double getPearsonVIIDerivWRTm(double peak_height, double offset, double weight, double m) const;
69
70 double getPearsonVIILimitmEq0(double peak_height) const;
71 double getPearsonVIIDerivWRThLimitmEq0() const;
72 double getPearsonVIIDerivWRTcLimitmEq0() const;
73 double getPearsonVIIDerivWRTwLimitmEq0() const;
74 double getPearsonVIIDerivWRTmLimitmEq0(double peak_height, double offset, double weight) const;
75
76protected:
77 void functionLocal(double *out, const double *xValues, const size_t nData) const override;
78 void functionDerivLocal(API::Jacobian *out, const double *xValues, const size_t nData) override;
80 void init() override;
81};
82
83double denominator_function(double offset_sq, double weight_sq, double m);
84double derivative_function(double peak_height, double offset, double weight, double m);
85double m_derivative_function(double peak_height, double offset_sq, double weight_sq, double m);
86
87} // namespace Functions
88} // namespace CurveFitting
89} // namespace Mantid
double value
The value of the point.
Definition: FitMW.cpp:51
double height
Definition: GetAllEi.cpp:155
An interface to a peak function, which extend the interface of IFunctionWithLocation by adding method...
Definition: IPeakFunction.h:51
Represents the Jacobian in IFitFunction::functionDeriv.
Definition: Jacobian.h:22
Provides an implementation of the asymmetric PearsonVII function (sometimes it is also referred to as...
const std::string category() const override
The categories the Fit function belong to.
std::string name() const override
Override IFunction base class methods.
double m_derivative_function(double peak_height, double offset_sq, double weight_sq, double m)
double denominator_function(double offset_sq, double weight_sq, double m)
double derivative_function(double peak_height, double offset, double weight, double m)
Helper class which provides the Collimation Length for SANS instruments.