1 | #ifndef MANTID_CURVEFITTING_Muon_DynamicKuboToyabe_H_ |
---|
2 | #define MANTID_CURVEFITTING_Muon_DynamicKuboToyabe_H_ |
---|
3 | |
---|
4 | //---------------------------------------------------------------------- |
---|
5 | // Includes |
---|
6 | //---------------------------------------------------------------------- |
---|
7 | #include "MantidAPI/IPeakFunction.h" |
---|
8 | //#include "MantidAPI/IFunctionWithLocation.h" |
---|
9 | namespace Mantid |
---|
10 | { |
---|
11 | namespace CurveFitting |
---|
12 | { |
---|
13 | /** |
---|
14 | Provide lorentzian peak shape function interface to IPeakFunction. |
---|
15 | I.e. the function: Height*( HWHM^2/((x-PeakCentre)^2+HWHM^2) ). |
---|
16 | |
---|
17 | |
---|
18 | LorentzianTest parameters: |
---|
19 | <UL> |
---|
20 | <LI> Height - height of peak (default 0.0)</LI> |
---|
21 | <LI> PeakCentre - centre of peak (default 0.0)</LI> |
---|
22 | <LI> HWHM - half-width half-maximum (default 1.0)</LI> |
---|
23 | </UL> |
---|
24 | |
---|
25 | @author Anders Markvardsen, ISIS, RAL |
---|
26 | @date 27/10/2009 |
---|
27 | |
---|
28 | Copyright © 2007-8 ISIS Rutherford Appleton Laboratory & NScD Oak Ridge National Laboratory |
---|
29 | |
---|
30 | This file is part of Mantid. |
---|
31 | |
---|
32 | Mantid is free software; you can redistribute it and/or modify |
---|
33 | it under the terms of the GNU General Public License as published by |
---|
34 | the Free Software Foundation; either version 3 of the License, or |
---|
35 | (at your option) any later version. |
---|
36 | |
---|
37 | Mantid is distributed in the hope that it will be useful, |
---|
38 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
39 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
40 | GNU General Public License for more details. |
---|
41 | |
---|
42 | You should have received a copy of the GNU General Public License |
---|
43 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
---|
44 | |
---|
45 | File change history is stored at: <https://svn.mantidproject.org/mantid/trunk/Code/Mantid> |
---|
46 | Code Documentation is available at: <http://doxygen.mantidproject.org> |
---|
47 | */ |
---|
48 | class DLLExport Muon_DynamicKuboToyabe : public API::IPeakFunction |
---|
49 | { |
---|
50 | public: |
---|
51 | /// Destructor |
---|
52 | virtual ~Muon_DynamicKuboToyabe() {}; |
---|
53 | |
---|
54 | |
---|
55 | /// overwrite IPeakFunction base class methods |
---|
56 | // virtual double A0()const {return getParameter("A");} |
---|
57 | // virtual double s()const {return getParameter("lambda");} |
---|
58 | |
---|
59 | virtual double centre()const {return getParameter("Delta");} |
---|
60 | virtual double height()const {return getParameter("A");} |
---|
61 | virtual double width()const {return 10;} |
---|
62 | virtual void setCentre(const double c) {setParameter("Delta",c);} |
---|
63 | virtual void setHeight(const double h) {setParameter("A",h);} |
---|
64 | virtual void setWidth(const double w) {} |
---|
65 | |
---|
66 | |
---|
67 | /// Here specify name of function as it will appear |
---|
68 | std::string name()const{return "Muon_DynamicKuboToyabe";} |
---|
69 | |
---|
70 | // ** OPTIONALLY MODIFY THIS ** |
---|
71 | /// The categories the Fit function belong to. |
---|
72 | /// Categories must be listed as a comma separated list. |
---|
73 | /// For example: "General, Muon\\Custom" which adds |
---|
74 | /// this function to the category "General" and the sub-category |
---|
75 | /// "Muon\\Custom" |
---|
76 | virtual const std::string category() const { return "C++ User Defined";} |
---|
77 | |
---|
78 | |
---|
79 | protected: |
---|
80 | virtual void functionLocal(double* out, const double* xValues, const size_t nData)const; |
---|
81 | virtual void functionDerivLocal(API::Jacobian* out, const double* xValues, const size_t nData); |
---|
82 | virtual void init(); |
---|
83 | |
---|
84 | }; |
---|
85 | |
---|
86 | } // namespace CurveFitting |
---|
87 | } // namespace Mantid |
---|
88 | |
---|
89 | #endif /*MANTID_CURVEFITTING_Muon_DynamicKuboToyabe_H_*/ |
---|