Skip to content

Commit

Permalink
Re #9776. Adding properties directive to fit functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterfpeterson committed Jun 30, 2014
1 parent 701a2e0 commit 1c926c4
Show file tree
Hide file tree
Showing 41 changed files with 115 additions and 72 deletions.
2 changes: 2 additions & 0 deletions Code/Mantid/docs/source/fitfunctions/Abragam.rst
Expand Up @@ -13,4 +13,6 @@ 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 ) )

.. properties::

.. categories::
2 changes: 2 additions & 0 deletions Code/Mantid/docs/source/fitfunctions/BSpline.rst
Expand Up @@ -21,4 +21,6 @@ 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
the type double. Likewise, the attribute names have the form 'xi'.

.. properties::

.. categories::
10 changes: 5 additions & 5 deletions Code/Mantid/docs/source/fitfunctions/BackToBackExponential.rst
Expand Up @@ -41,13 +41,13 @@ peak:
.. figure:: /images/BackToBackExponentialWithConstBackground.png
:alt: BackToBackExponentialWithConstBackground.png

BackToBackExponentialWithConstBackground.png

Properties
----------

*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
HRPD instrument.*
.. 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
HRPD instrument.

.. properties::

.. categories::
2 changes: 2 additions & 0 deletions Code/Mantid/docs/source/fitfunctions/BivariateNormal.rst
Expand Up @@ -64,4 +64,6 @@ square or contiguous subregion of a panel
The values for out in function1D are, for each pixel, the difference of
V(see formula) and dataY(0).

.. properties::

.. categories::
2 changes: 2 additions & 0 deletions Code/Mantid/docs/source/fitfunctions/Chebyshev.rst
Expand Up @@ -35,4 +35,6 @@ index starting from 0.
The other two attributes are doubles 'StartX' and 'EndX' which define
the expansion (fitting) interval.

.. properties::

.. categories::
2 changes: 2 additions & 0 deletions Code/Mantid/docs/source/fitfunctions/ChudleyElliot.rst
Expand Up @@ -15,4 +15,6 @@ motions of molecules. The Chudley-Elliot Jump diffusion model (1961) has the for

.. math:: Gamma(Q) = (1 - sin(Ql)/Ql)/tau

.. properties::

.. categories::
2 changes: 2 additions & 0 deletions Code/Mantid/docs/source/fitfunctions/CompositeFunction.rst
Expand Up @@ -65,4 +65,6 @@ inner one in brackets:

``name=LinearBackground;(composite=Convolution;name=Resolution;name=Lorentzian)``

.. properties::

.. categories::
4 changes: 1 addition & 3 deletions Code/Mantid/docs/source/fitfunctions/Convolution.rst
Expand Up @@ -33,13 +33,11 @@ box function:
.. figure:: /images/Convolution.png
:alt: Convolution.png

Convolution.png

Note that the box function is defined on interval [-5, 5]:

.. figure:: /images/Box.png
:alt: Box.png

Box.png
.. properties::

.. categories::
2 changes: 2 additions & 0 deletions Code/Mantid/docs/source/fitfunctions/CubicSpline.rst
Expand Up @@ -21,4 +21,6 @@ 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
the type double. Likewise, the attribute names have the form 'xi'.

.. properties::

.. categories::
13 changes: 1 addition & 12 deletions Code/Mantid/docs/source/fitfunctions/DiffRotDiscreteCircle.rst
Expand Up @@ -118,17 +118,6 @@ Then:

</center>

Properties
----------

+---------+-------------+-----------+-----------------------------------------------------------------------------------------+
| Order | Name | Default | Description |
+=========+=============+===========+=========================================================================================+
| 1 | Intensity | 1.0 | Intensity of the peak [arbitrary units] |
+---------+-------------+-----------+-----------------------------------------------------------------------------------------+
| 2 | Radius | 1.0 | Circle radius [Angstroms] |
+---------+-------------+-----------+-----------------------------------------------------------------------------------------+
| 3 | Decay | 1.0 | inverse of the transition rate (ps if energy in meV; ns if energy in :math:`\mu`\ eV) |
+---------+-------------+-----------+-----------------------------------------------------------------------------------------+
.. properties::

.. categories::
13 changes: 1 addition & 12 deletions Code/Mantid/docs/source/fitfunctions/DiffSphere.rst
Expand Up @@ -52,17 +52,6 @@ The fit function DiffSphere has an elastic part, modelled by fitting
function ElasticDiffSphere and an inelastic part, modelled by
InelasticDiffSphere.

Properties
----------

+---------+-------------+-----------+----------------------------------------------------------------------------+
| Order | Name | Default | Description |
+=========+=============+===========+============================================================================+
| 1 | Intensity | 1.0 | Intensity of the peak [arbitrary units] |
+---------+-------------+-----------+----------------------------------------------------------------------------+
| 2 | Radius | 2.0 | Sphere radius [Å] |
+---------+-------------+-----------+----------------------------------------------------------------------------+
| 3 | Diffusion | 0.05 | Diffusion constant [Å\ :math:`{}^2/ps \equiv 10 \cdot (10^{-5} cm^2/s)`] |
+---------+-------------+-----------+----------------------------------------------------------------------------+
.. properties::

.. categories::
2 changes: 2 additions & 0 deletions Code/Mantid/docs/source/fitfunctions/ExpDecay.rst
Expand Up @@ -13,4 +13,6 @@ Exponential decay function is defined by

.. math:: \mbox{Height}\times \exp(-\frac{x}{\mbox{Lifetime}})

.. properties::

.. categories::
2 changes: 2 additions & 0 deletions Code/Mantid/docs/source/fitfunctions/ExpDecayMuon.rst
Expand Up @@ -13,4 +13,6 @@ Exponential decay for use by Muon scientists defined by

.. math:: \mbox{A}\times \exp(-{Lambda} \times {x})

.. properties::

.. categories::
2 changes: 2 additions & 0 deletions Code/Mantid/docs/source/fitfunctions/ExpDecayOsc.rst
Expand Up @@ -13,4 +13,6 @@ Oscillation exponential decay function is defined by

.. math:: \mbox{A}\times \exp(-{Lambda} \times {x}) \times cos( 2 \pi \times {Frequency} \times {x} + {Phi} )

.. properties::

.. categories::
2 changes: 2 additions & 0 deletions Code/Mantid/docs/source/fitfunctions/FickDiffusion.rst
Expand Up @@ -15,4 +15,6 @@ motions of molecules. Fick's law for diffusion has the form:

.. math:: Gamma(Q) = D*Q^2 where D=<l^2>*Q^2/6*tau

.. properties::

.. categories::
2 changes: 2 additions & 0 deletions Code/Mantid/docs/source/fitfunctions/FlatBackground.rst
Expand Up @@ -13,4 +13,6 @@ A Flat background function is defined as:

:math:`y = A_0`

.. properties::

.. categories::
2 changes: 2 additions & 0 deletions Code/Mantid/docs/source/fitfunctions/GausDecay.rst
Expand Up @@ -13,4 +13,6 @@ Gaussian decay for use by Muon scientists defined by

.. math:: \mbox{A}\times \exp(-{Sigma}^2 \times {x}^2 )

.. properties::

.. categories::
2 changes: 2 additions & 0 deletions Code/Mantid/docs/source/fitfunctions/GausOsc.rst
Expand Up @@ -13,4 +13,6 @@ 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} )

.. properties::

.. categories::
2 changes: 2 additions & 0 deletions Code/Mantid/docs/source/fitfunctions/Gaussian.rst
Expand Up @@ -29,4 +29,6 @@ a TOF peak:
.. figure:: /images/GaussianWithConstBackground.png
:alt: GaussianWithConstBackground.png

.. properties::

.. categories::
2 changes: 2 additions & 0 deletions Code/Mantid/docs/source/fitfunctions/HallRoss.rst
Expand Up @@ -15,4 +15,6 @@ motions of molecules. The Hall-Ross Jump diffusion model has the form:

.. math:: Gamma(Q) = (1-exp(-l*Q^2))/tau

.. properties::

.. categories::
2 changes: 2 additions & 0 deletions Code/Mantid/docs/source/fitfunctions/IkedaCarpenterPV.rst
Expand Up @@ -69,4 +69,6 @@ peak:
.. figure:: /images/IkedaCarpenterPVwithBackground.png
:alt: IkedaCarpenterPVwithBackground.png

.. properties::

.. categories::
1 change: 1 addition & 0 deletions Code/Mantid/docs/source/fitfunctions/LatticeErrors.rst
Expand Up @@ -10,5 +10,6 @@ Description
-----------


.. properties::

.. categories::
2 changes: 2 additions & 0 deletions Code/Mantid/docs/source/fitfunctions/LinearBackground.rst
Expand Up @@ -16,4 +16,6 @@ A linear background function is defined as:
Note this function is currently named LinearBackground and is likely to
be renamed to Linear in the not too distance future.

.. properties::

.. categories::
2 changes: 2 additions & 0 deletions Code/Mantid/docs/source/fitfunctions/LogNormal.rst
Expand Up @@ -13,4 +13,6 @@ The LogNormal fit function is defined by

.. math:: \frac{Height}{x} \cdot exp^{-\frac{ln(x)-Location}{2 \times Scale^2}}

.. properties::

.. categories::
2 changes: 2 additions & 0 deletions Code/Mantid/docs/source/fitfunctions/Lorentzian.rst
Expand Up @@ -36,4 +36,6 @@ a TOF peak:
.. figure:: /images/LorentzianWithConstBackground.png
:alt: LorentzianWithConstBackground.png

.. properties::

.. categories::
2 changes: 2 additions & 0 deletions Code/Mantid/docs/source/fitfunctions/MuonFInteraction.rst
Expand Up @@ -30,4 +30,6 @@ and

.

.. properties::

.. categories::
Expand Up @@ -186,4 +186,6 @@ where
:math:`erfc(x)` and :math:`E_1(z)` will be calculated numerically.

.. properties::

.. categories::
19 changes: 9 additions & 10 deletions Code/Mantid/docs/source/fitfunctions/PeakHKLErrors.rst
Expand Up @@ -23,8 +23,15 @@ Attributes
#. PeakWorkspaceName : The name of the PeaksWorkspace in the
AnalysisDataService

Parameters
##########
Outputs
#######

The PeaksWorkspace is NOT changed.

The argument out in function1D has ,for each peak, the h,k, and l
offsets from an integer using the current parameter values.

.. properties::

#. SampleXOffset- XOffset of Goniometer center from instrument center in
meters
Expand All @@ -51,12 +58,4 @@ Parameters
When used in fitting, some or all of the first 6 parameters could
be tied to zero.

Outputs
#######

The PeaksWorkspace is NOT changed.

The argument out in function1D has ,for each peak, the h,k, and l
offsets from an integer using the current parameter values.

.. categories::
2 changes: 2 additions & 0 deletions Code/Mantid/docs/source/fitfunctions/ProductFunction.rst
Expand Up @@ -15,4 +15,6 @@ functions to produce the output. Use this function to construct a
product of two or more fitting functions defined in Mantid. A member of
a ProductFunction can be a composite function itself.

.. properties::

.. categories::
2 changes: 2 additions & 0 deletions Code/Mantid/docs/source/fitfunctions/Quadratic.rst
Expand Up @@ -19,4 +19,6 @@ where
- A1 - coefficient for linear term
- A2 - coefficient for quadratic term

.. properties::

.. categories::
51 changes: 24 additions & 27 deletions Code/Mantid/docs/source/fitfunctions/SCDPanelErrors.rst
Expand Up @@ -34,28 +34,26 @@ Attributes
- gamma -The lattice parameter gamma in degrees
- PeakWorkspaceName-The name of the PeaksWorkspace in the Analysis Data
Service.

This peak must be indexed by a UB matrix whose lattice parameters
are CLOSE to the above
lattice paramters
This peak must be indexed by a UB matrix whose lattice parameters
are CLOSE to the above
lattice paramters

- NGroups-The number of grouping of banks to be considered
- BankNames-a list of banknames separated by "/" or a "!" if the next
bank is in a different group.

Bank names from the same group belong together("Requirement" for use
with the Fit algorithm)
Bank names from the same group belong together("Requirement" for use
with the Fit algorithm)

- startX- -1 or starting position in the workspace( see below) to start
calculating the outputs
- endX- -1 or 1+ ending position in the workspace( see below) to start
calculating the outputs
- RotateCenters-Boolean. If false Rotations are only about the center
of the banks. Otherwise rotations are ALSO

around center of the instrument( For groups of banks, this will
result in a rotation about the center of all pixels.)

around center of the instrument( For groups of banks, this will
result in a rotation about the center of all pixels.)
- SampleOffsets-Boolean. A sample being off from the center of the
goniometer can result in larger errors.

Expand All @@ -69,8 +67,22 @@ errors are all 1.0
This spectra may have to be copied 3 times because of requirements from
the fitting system.

Parameters
~~~~~~~~~~
Output
~~~~~~

The argument out from function1D ,for each peak, gives the error in qx,
qy, and qz. The theoretical values for the qx, qy and qz are found as
follows:

- Calculating the best fitting UB for the given indexing and parameter
values
- Find U
- The theoretical UB is then U\*B\ :sub:`0` where B\ :sub:`0` is formed
from the supplied lattice parameters
- The theoretical qx,qy,and qz can be obtained by multiplying the hkl
for the peak by this matrix(/2π)

.. properties::

- l0- the initial Flight path in units from Peak.getL1
- t0-Time offset in the same units returned with Peak.getTOF)
Expand Down Expand Up @@ -102,19 +114,4 @@ Parameters

The order of rotations correspond to the order used in all of Mantid.

Output
~~~~~~

The argument out from function1D ,for each peak, gives the error in qx,
qy, and qz. The theoretical values for the qx, qy and qz are found as
follows:

- Calculating the best fitting UB for the given indexing and parameter
values
- Find U
- The theoretical UB is then U\*B\ :sub:`0` where B\ :sub:`0` is formed
from the supplied lattice parameters
- The theoretical qx,qy,and qz can be obtained by multiplying the hkl
for the peak by this matrix(/2π)

.. categories::
2 changes: 2 additions & 0 deletions Code/Mantid/docs/source/fitfunctions/StaticKuboToyabe.rst
Expand Up @@ -14,4 +14,6 @@ by

.. math:: \mbox{A}\times ( \exp(-{Delta}^2 \times {x}^2 / 2 ) \times ( 1 - ( {Delta}^2 \times {x}^2 ) ) \times \frac 2 3 + \frac 1 3 )

.. properties::

.. categories::
Expand Up @@ -13,4 +13,6 @@ Fitting function for use by Muon scientists defined by:

:math:`\mbox{A}\times ( \exp(-{Delta}^2 \times {x}^2 / 2 ) \times ( 1 - ( {Delta}^2 \times {x}^2 ) ) \times \frac 2 3 + \frac 1 3 ) \times \exp(-{Lambda} \times {x})`

.. properties::

.. categories::
Expand Up @@ -13,4 +13,6 @@ Fitting function for use by Muon scientists defined by:

:math:`\mbox{A}\times ( \exp(-{Delta}^2 \times {x}^2 / 2 ) \times ( 1 - ( {Delta}^2 \times {x}^2 ) ) \times \frac 2 3 + \frac 1 3 ) \times \exp(-{Sigma}^2 \times {x}^2 )`

.. properties::

.. categories::
2 changes: 2 additions & 0 deletions Code/Mantid/docs/source/fitfunctions/StretchExp.rst
Expand Up @@ -13,4 +13,6 @@ The Stretched exponential fit function is defined by

.. math:: Height \cdot e^{-(\frac{x}{Lifetime})^{Stretching} }

.. properties::

.. categories::
2 changes: 2 additions & 0 deletions Code/Mantid/docs/source/fitfunctions/StretchExpMuon.rst
Expand Up @@ -13,4 +13,6 @@ The Stretched exponential fit function is defined by

.. math:: A \cdot e^{ (-{Lambda} \times {x}) ^{Beta} }

.. properties::

.. categories::

0 comments on commit 1c926c4

Please sign in to comment.