Skip to content
Snippets Groups Projects
Commit 820ad406 authored by Nick Draper's avatar Nick Draper
Browse files

re #9649 A few warnings, but more importanly a catergory for functions

parent 4aa765d7
No related branches found
No related tags found
No related merge requests found
Showing
with 46 additions and 7 deletions
...@@ -48,7 +48,7 @@ set before any other. ...@@ -48,7 +48,7 @@ set before any other.
The function and the initial values for its parameters are set with the The function and the initial values for its parameters are set with the
Function property. A function can be simple or composite. A `simple Function property. A function can be simple or composite. A `simple
function <:Category:Fit_functions>`__ has a name registered with Mantid function <../categories/Functions.html>`__ has a name registered with Mantid
framework. The Fit algorithm creates an instance of a function by this framework. The Fit algorithm creates an instance of a function by this
name. A composite function is an arithmetic sum of two or more functions name. A composite function is an arithmetic sum of two or more functions
(simple or composite). Each function has a number of named parameters, (simple or composite). Each function has a number of named parameters,
...@@ -74,7 +74,7 @@ To use a simple function for a fit set its name and initial parameter ...@@ -74,7 +74,7 @@ To use a simple function for a fit set its name and initial parameter
values using the Function property. This property is a comma separated values using the Function property. This property is a comma separated
list of name=value pairs. The name of the first name=value pairs must be list of name=value pairs. The name of the first name=value pairs must be
"name" and it must be set equal to the name of one of a `simple "name" and it must be set equal to the name of one of a `simple
function <:Category:Fit_functions>`__. This name=value pair is followed function <../categories/Functions.html>`__. This name=value pair is followed
by name=value pairs specifying values for the parameters of this by name=value pairs specifying values for the parameters of this
function. If a parameter is not set in Function it will be given its function. If a parameter is not set in Function it will be given its
default value defined by the function. All names are case sensitive. For default value defined by the function. All names are case sensitive. For
...@@ -96,7 +96,7 @@ are created when the Formula attribute is set. It is important that ...@@ -96,7 +96,7 @@ are created when the Formula attribute is set. It is important that
Formula is defined before initializing the parameters. Formula is defined before initializing the parameters.
A list of the available simple functions can be found A list of the available simple functions can be found
`here <:Category:Fit_functions>`__. `here <../categories/Functions.html>`__.
Setting a composite function Setting a composite function
############################ ############################
...@@ -105,11 +105,11 @@ A composite function is a sum of simple functions. It does not have a ...@@ -105,11 +105,11 @@ A composite function is a sum of simple functions. It does not have a
name. To define a composite function set a number of simple functions in name. To define a composite function set a number of simple functions in
the Function property. Each simple function definition must be separated the Function property. Each simple function definition must be separated
by a semicolon ';'. For example fitting two Gaussians on a linear by a semicolon ';'. For example fitting two Gaussians on a linear
background might look like this: background might look like this::
| ``Function: "name=LinearBackground, A0=0.3; `` Function: "name=LinearBackground, A0=0.3;
| `` name=Gaussian, PeakCentre=4.6, Height=10, Sigma=0.5;`` name=Gaussian, PeakCentre=4.6, Height=10, Sigma=0.5;
| `` name=Gaussian, PeakCentre=7.6, Height=8, Sigma=0.5"`` name=Gaussian, PeakCentre=7.6, Height=8, Sigma=0.5"
Setting ties Setting ties
############ ############
......
...@@ -67,6 +67,7 @@ Usage ...@@ -67,6 +67,7 @@ Usage
print 'Output Y:', output.readY(0) print 'Output Y:', output.readY(0)
print 'Output X:', output.readX(0) print 'Output X:', output.readX(0)
Output: Output:
.. testoutput:: ExZimm .. testoutput:: ExZimm
...@@ -88,6 +89,7 @@ Output: ...@@ -88,6 +89,7 @@ Output:
print 'Output Y:', output.readY(0) print 'Output Y:', output.readY(0)
print 'Output X:', output.readX(0) print 'Output X:', output.readX(0)
Output: Output:
.. testoutput:: ExZimmBg .. testoutput:: ExZimmBg
...@@ -112,6 +114,7 @@ Output: ...@@ -112,6 +114,7 @@ Output:
print 'Output Y:', output.readY(0) print 'Output Y:', output.readY(0)
print 'Output X:', output.readX(0) print 'Output X:', output.readX(0)
Output: Output:
.. testoutput:: ExGeneral .. testoutput:: ExGeneral
......
...@@ -38,6 +38,7 @@ Usage ...@@ -38,6 +38,7 @@ Usage
rb = Rebin2D(wsc,[0,100,20000],[0,0.01,1.2],UseFractionalArea=True) rb = Rebin2D(wsc,[0,100,20000],[0,0.01,1.2],UseFractionalArea=True)
print ("Bins in the X axis: %i" % rb.blocksize()) print ("Bins in the X axis: %i" % rb.blocksize())
print ("Bins in the Y axis: %i" % rb.getNumberHistograms()) print ("Bins in the Y axis: %i" % rb.getNumberHistograms())
Output: Output:
.. testoutput:: ExUseFractionalArea .. testoutput:: ExUseFractionalArea
...@@ -56,6 +57,7 @@ Output: ...@@ -56,6 +57,7 @@ Output:
rb = Rebin2D(wsc,[0,100,20000],[0,0.01,1.2],Transpose=True) rb = Rebin2D(wsc,[0,100,20000],[0,0.01,1.2],Transpose=True)
print ("Bins in the X axis: %i" % rb.blocksize()) print ("Bins in the X axis: %i" % rb.blocksize())
print ("Bins in the Y axis: %i" % rb.getNumberHistograms()) print ("Bins in the Y axis: %i" % rb.getNumberHistograms())
Output: Output:
.. testoutput:: ExTranspose .. testoutput:: ExTranspose
......
...@@ -9,3 +9,5 @@ Description ...@@ -9,3 +9,5 @@ Description
Abragam fitting function for use by Muon scientists defined by Abragam fitting function for use by Muon scientists defined by
.. math:: \mbox{A}\times cos( 2 \pi \times {Omega} \times {x} + {Phi} ) \times \exp(-{Sigma}^2 \times Tau^2 \times {x}^2 \times ( exp ( {x} / Tau ) - 1 + {x} / Tau ) ) .. math:: \mbox{A}\times cos( 2 \pi \times {Omega} \times {x} + {Phi} ) \times \exp(-{Sigma}^2 \times Tau^2 \times {x}^2 \times ( exp ( {x} / Tau ) - 1 + {x} / Tau ) )
.. categories:: Functions
\ No newline at end of file
...@@ -17,3 +17,5 @@ first attrbiute is 'n' which has integer type and sets the number of ...@@ -17,3 +17,5 @@ first attrbiute is 'n' which has integer type and sets the number of
interpolation points. The parameter names have the form 'yi' where 'y' interpolation points. The parameter names have the form 'yi' where 'y'
is letter 'y' and 'i' is the parameter's index starting from 0 and have is letter 'y' and 'i' is the parameter's index starting from 0 and have
the type double. Likewise, the attribute names have the form 'xi'. the type double. Likewise, the attribute names have the form 'xi'.
.. categories:: Functions
\ No newline at end of file
...@@ -45,3 +45,5 @@ Properties ...@@ -45,3 +45,5 @@ Properties
*Note the initial default guesses for in particular A and B are only *Note the initial default guesses for in particular A and B are only
based on fitting a couple of peaks in a dataset collected on the ISIS's based on fitting a couple of peaks in a dataset collected on the ISIS's
HRPD instrument.* HRPD instrument.*
.. categories:: Functions
\ No newline at end of file
...@@ -60,3 +60,5 @@ square or contiguous subregion of a panel ...@@ -60,3 +60,5 @@ square or contiguous subregion of a panel
The values for out in function1D are, for each pixel, the difference of The values for out in function1D are, for each pixel, the difference of
V(see formula) and dataY(0). V(see formula) and dataY(0).
.. categories:: Functions
\ No newline at end of file
...@@ -31,3 +31,5 @@ index starting from 0. ...@@ -31,3 +31,5 @@ index starting from 0.
The other two attributes are doubles 'StartX' and 'EndX' which define The other two attributes are doubles 'StartX' and 'EndX' which define
the expansion (fitting) interval. the expansion (fitting) interval.
.. categories:: Functions
\ No newline at end of file
...@@ -61,3 +61,5 @@ To define a composite function inside a composite function enclose the ...@@ -61,3 +61,5 @@ To define a composite function inside a composite function enclose the
inner one in brackets: inner one in brackets:
``name=LinearBackground;(composite=Convolution;name=Resolution;name=Lorentzian)`` ``name=LinearBackground;(composite=Convolution;name=Resolution;name=Lorentzian)``
.. categories:: Functions
\ No newline at end of file
...@@ -37,3 +37,5 @@ Note that the box function is defined on interval [-5, 5]: ...@@ -37,3 +37,5 @@ Note that the box function is defined on interval [-5, 5]:
:alt: Box.png :alt: Box.png
Box.png Box.png
.. categories:: Functions
\ No newline at end of file
...@@ -17,3 +17,5 @@ The first attrbiute is 'n' which has integer type and sets the number of ...@@ -17,3 +17,5 @@ The first attrbiute is 'n' which has integer type and sets the number of
interpolation points. The parameter names have the form 'yi' where 'y' interpolation points. The parameter names have the form 'yi' where 'y'
is letter 'y' and 'i' is the parameter's index starting from 0 and have is letter 'y' and 'i' is the parameter's index starting from 0 and have
the type double. Likewise, the attribute names have the form 'xi'. the type double. Likewise, the attribute names have the form 'xi'.
.. categories:: Functions
\ No newline at end of file
...@@ -129,3 +129,5 @@ Properties ...@@ -129,3 +129,5 @@ Properties
+---------+-------------+-----------+-----------------------------------------------------------------------------------------+ +---------+-------------+-----------+-----------------------------------------------------------------------------------------+
Category:Fit_functions Category:Fit_functions
.. categories:: Functions
\ No newline at end of file
...@@ -63,3 +63,5 @@ Properties ...@@ -63,3 +63,5 @@ Properties
+---------+-------------+-----------+----------------------------------------------------------------------------+ +---------+-------------+-----------+----------------------------------------------------------------------------+
Category:Fit_functions Category:Fit_functions
.. categories:: Functions
\ No newline at end of file
...@@ -9,3 +9,5 @@ Description ...@@ -9,3 +9,5 @@ Description
Exponential decay function is defined by Exponential decay function is defined by
.. math:: \mbox{Height}\times \exp(-\frac{x}{\mbox{Lifetime}}) .. math:: \mbox{Height}\times \exp(-\frac{x}{\mbox{Lifetime}})
.. categories:: Functions
\ No newline at end of file
...@@ -9,3 +9,5 @@ Description ...@@ -9,3 +9,5 @@ Description
Exponential decay for use by Muon scientists defined by Exponential decay for use by Muon scientists defined by
.. math:: \mbox{A}\times \exp(-{Lambda} \times {x}) .. math:: \mbox{A}\times \exp(-{Lambda} \times {x})
.. categories:: Functions
\ No newline at end of file
...@@ -9,3 +9,5 @@ Description ...@@ -9,3 +9,5 @@ Description
Oscillation exponential decay function is defined by Oscillation exponential decay function is defined by
.. math:: \mbox{A}\times \exp(-{Lambda} \times {x}) \times cos( 2 \pi \times {Frequency} \times {x} + {Phi} ) .. math:: \mbox{A}\times \exp(-{Lambda} \times {x}) \times cos( 2 \pi \times {Frequency} \times {x} + {Phi} )
.. categories:: Functions
\ No newline at end of file
...@@ -9,3 +9,5 @@ Description ...@@ -9,3 +9,5 @@ Description
A Flat background function is defined as: A Flat background function is defined as:
:math:`y = A_0` :math:`y = A_0`
.. categories:: Functions
\ No newline at end of file
...@@ -9,3 +9,5 @@ Description ...@@ -9,3 +9,5 @@ Description
Gaussian decay for use by Muon scientists defined by Gaussian decay for use by Muon scientists defined by
.. math:: \mbox{A}\times \exp(-{Sigma}^2 \times {x}^2 ) .. math:: \mbox{A}\times \exp(-{Sigma}^2 \times {x}^2 )
.. categories:: Functions
\ No newline at end of file
...@@ -9,3 +9,5 @@ Description ...@@ -9,3 +9,5 @@ Description
Oscillating Gaussian decay for use by Muon scientists defined by Oscillating Gaussian decay for use by Muon scientists defined by
.. math:: \mbox{A}\times \exp(-{Sigma}^2 \times {x}^2) \times cos( 2 \pi \times {Frequency} \times {x} + {Phi} ) .. math:: \mbox{A}\times \exp(-{Sigma}^2 \times {x}^2) \times cos( 2 \pi \times {Frequency} \times {x} + {Phi} )
.. categories:: Functions
\ No newline at end of file
...@@ -27,3 +27,5 @@ a TOF peak: ...@@ -27,3 +27,5 @@ a TOF peak:
:alt: GaussianWithConstBackground.png :alt: GaussianWithConstBackground.png
GaussianWithConstBackground.png GaussianWithConstBackground.png
.. categories:: Functions
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment