Mantid
Loading...
Searching...
No Matches
Gaussian.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2007 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
9//----------------------------------------------------------------------
10// Includes
11//----------------------------------------------------------------------
13#include "MantidCurveFitting/DllConfig.h"
14#include <cmath>
15
16namespace Mantid {
17namespace CurveFitting {
18namespace Functions {
36class MANTID_CURVEFITTING_DLL Gaussian : public API::IPeakFunction {
37public:
38 Gaussian();
40 double centre() const override;
41 double height() const override;
42 double fwhm() const override;
43 double intensity() const override;
44 double intensityError() const override;
45 void setCentre(const double c) override;
46 void setHeight(const double h) override;
47 void setFwhm(const double w) override;
48 void setIntensity(const double i) override;
49
50 void fixCentre(bool isDefault = false) override;
51 void unfixCentre() override;
52 void fixIntensity(bool isDefault = false) override;
53 void unfixIntensity() override;
54
56 std::string name() const override { return "Gaussian"; }
57 const std::string category() const override { return "Peak; Muon\\MuonModelling"; }
58 void setActiveParameter(size_t i, double value) override;
59 double activeParameter(size_t i) const override;
60
61protected:
62 void functionLocal(double *out, const double *xValues, const size_t nData) const override;
63 void functionDerivLocal(API::Jacobian *out, const double *xValues, const size_t nData) override;
65 void init() override;
67 void histogram1D(double *out, double left, const double *right, const size_t nBins) const override;
69 void histogramDerivative1D(API::Jacobian *jacobian, double left, const double *right,
70 const size_t nBins) const override;
72 mutable double m_intensityCache;
73};
74
75} // namespace Functions
76} // namespace CurveFitting
77} // namespace Mantid
double value
The value of the point.
Definition: FitMW.cpp:51
double height
Definition: GetAllEi.cpp:155
double left
Definition: LineProfile.cpp:80
double right
Definition: LineProfile.cpp:81
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
Provide gaussian peak shape function interface to IPeakFunction.
Definition: Gaussian.h:36
const std::string category() const override
The categories the Fit function belong to.
Definition: Gaussian.h:57
std::string name() const override
overwrite IFunction base class methods
Definition: Gaussian.h:56
double m_intensityCache
Intensity cache to help recover form Sigma==0 situation.
Definition: Gaussian.h:72
Helper class which provides the Collimation Length for SANS instruments.