From 6e4da70533e2834f46c6db42bd9554b9a07f62ac Mon Sep 17 00:00:00 2001
From: Martyn Gigg <martyn.gigg@stfc.ac.uk>
Date: Fri, 31 Oct 2014 12:11:40 +0000
Subject: [PATCH] Add documentation file for algorithm.

Refs #10169
---
 .../MantidCurveFitting/CalculateMSVesuvio.h   |  4 +-
 .../algorithms/CalculateMSVesuvio-v1.rst      | 59 +++++++++++++++++++
 2 files changed, 61 insertions(+), 2 deletions(-)
 create mode 100644 Code/Mantid/docs/source/algorithms/CalculateMSVesuvio-v1.rst

diff --git a/Code/Mantid/Framework/CurveFitting/inc/MantidCurveFitting/CalculateMSVesuvio.h b/Code/Mantid/Framework/CurveFitting/inc/MantidCurveFitting/CalculateMSVesuvio.h
index 82069d60717..0938057d47f 100644
--- a/Code/Mantid/Framework/CurveFitting/inc/MantidCurveFitting/CalculateMSVesuvio.h
+++ b/Code/Mantid/Framework/CurveFitting/inc/MantidCurveFitting/CalculateMSVesuvio.h
@@ -86,8 +86,8 @@ namespace Mantid
       /// @copydoc Algorithm::summary
       virtual const std::string summary() const
       {
-        return "Corrects for the effects of multiple scattering "
-               "on a flat plate or cylindrical sample.";
+        return "Calculates the contributions of multiple scattering "
+               "on a flat plate sample for VESUVIO";
       }
 
     private:
diff --git a/Code/Mantid/docs/source/algorithms/CalculateMSVesuvio-v1.rst b/Code/Mantid/docs/source/algorithms/CalculateMSVesuvio-v1.rst
new file mode 100644
index 00000000000..8eddae38cac
--- /dev/null
+++ b/Code/Mantid/docs/source/algorithms/CalculateMSVesuvio-v1.rst
@@ -0,0 +1,59 @@
+.. algorithm::
+
+.. summary::
+
+.. alias::
+
+.. properties::
+
+Description
+-----------
+
+Calculates the multiple scattering contribution for deep inelastic neutron scattering on
+the `Vesuvio <http://www.isis.stfc.ac.uk/instruments/vesuvio/vesuvio4837.html>`__ instrument at
+ISIS. The algorithm follows the procedures defined by J. Mayers et al. [1]_.
+
+
+Usage
+-----
+
+.. code-block:: python
+
+   runs = "" # fill in run numbers here
+   ip_file = "" # fill in IP file here
+   data = LoadVesuvio(Filename=, SpectrumList=spectra,
+                      Mode="SingleDifference", InstrumentParFile=ip_file)
+   # Cut it down to the typical range
+   data = CropWorkspace(raw_ws,XMin=50.0,XMax=562.0)
+   # Coarser binning
+   data = Rebin(raw_ws, Params=[49.5, 1.0, 562.5])
+
+   # Create sample shape
+   height = 0.1 # y-dir (m)
+   width = 0.1 # x-dir (m)
+   thick = 0.005 # z-dir (m)
+   
+   half_height, half_width, half_thick = 0.5*height, 0.5*width, 0.5*thick
+   xml_str = \
+      " <cuboid id=\"sample-shape\"> " \
+       + "<left-front-bottom-point x=\"%f\" y=\"%f\" z=\"%f\" /> " % (half_width,-half_height,half_thick) \
+       + "<left-front-top-point x=\"%f\" y=\"%f\" z=\"%f\" /> " % (half_width, half_height, half_thick) \
+       + "<left-back-bottom-point x=\"%f\" y=\"%f\" z=\"%f\" /> " % (half_width, -half_height, -half_thick) \
+       + "<right-front-bottom-point x=\"%f\" y=\"%f\" z=\"%f\" /> " % (-half_width, -half_height, half_thick) \
+       + "</cuboid>"
+   CreateSampleShape(data, xml_str)
+   atom_props = [1.007900, 0.9272392, 5.003738,
+                 16.00000, 3.2587662E-02, 13.92299,
+                 27.50000, 4.0172841E-02, 15.07701]
+   tot_scatter, ms_scatter = \
+       CalculateMSVesuvio(data, NoOfMasses=3, SampleDensity=241, AtomicProperties=atom_props,
+                          BeamRadius=2.5)
+
+References
+----------
+
+.. [1] J. Mayers, A.L. Fielding and R. Senesi, `Nucl. Inst Methods A 481, 454(2002) <http://dx.doi.org/10.1016/S0168-9002(01)01335-3>`__
+
+
+
+.. categories::
-- 
GitLab