From dfde7271b1264508726ef510fbe3de44ca1c3bcb Mon Sep 17 00:00:00 2001 From: Jay Rainey <jawrainey@gmail.com> Date: Thu, 5 Jun 2014 13:30:53 +0100 Subject: [PATCH] Add usage to UnwrapMonitor. Refs #9585. --- .../inc/MantidAlgorithms/UnwrapMonitor.h | 9 ++++-- .../source/algorithms/UnwrapMonitor-v1.rst | 29 ++++++++++++++++--- 2 files changed, 31 insertions(+), 7 deletions(-) diff --git a/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/UnwrapMonitor.h b/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/UnwrapMonitor.h index 28e29ea28f3..3ca8e81214b 100644 --- a/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/UnwrapMonitor.h +++ b/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/UnwrapMonitor.h @@ -51,9 +51,12 @@ public: virtual ~UnwrapMonitor(); /// Algorithm's name for identification overriding a virtual method virtual const std::string name() const { return "UnwrapMonitor"; } - ///Summary of algorithms purpose - virtual const std::string summary() const {return "Takes an input workspace that contains 'raw' data, unwraps the data according to the reference flightpath provided and converts the units to wavelength. The output workspace will have common bins in the maximum theoretical wavelength range.";} - + /// Summary of algorithms purpose + virtual const std::string summary() const { + return "Takes an input workspace that contains 'raw' data, unwraps the data " + "according to the reference flightpath provided and converts the units to wavelength." + "The output workspace will have common bins in the maximum theoretical wavelength range."; + } /// Algorithm's version for identification overriding a virtual method virtual int version() const { return 1; } /// Algorithm's category for identification overriding a virtual method diff --git a/Code/Mantid/docs/source/algorithms/UnwrapMonitor-v1.rst b/Code/Mantid/docs/source/algorithms/UnwrapMonitor-v1.rst index dab0c413f02..1799e12d621 100644 --- a/Code/Mantid/docs/source/algorithms/UnwrapMonitor-v1.rst +++ b/Code/Mantid/docs/source/algorithms/UnwrapMonitor-v1.rst @@ -75,16 +75,37 @@ Restrictions on the input workspace ################################### The input workspace must contain histogram data where the X unit is -time-of-flight and the Y data is raw counts. The -`instrument <instrument>`__ associated with the workspace must be fully -defined because detector, source & sample position are needed. +time-of-flight and the Y data is raw counts. The instrument associated with the +workspace must be fully defined because detector, source & sample position are needed. Child algorithms used ##################### If the input workspace contains more than a single spectrum, Unwrap -makes use of the `rebin <rebin>`__ algorithm to set the bins on the +makes use of the :ref:`rebin <algm-Rebin>` algorithm to set the bins on the output workspace to common values which cover the maximum theoretically accessible wavelength range. +Usage +----- + +**Example - unwrapping a raw workspace.** + +.. testcode:: UnwrapMonitor + + # Create a raw data workspace. + ws = CreateSampleWorkspace() + + # The result variable will contain a tuple: (OutputWorkspace, JoinWaveLength) + # To access individual outputs use result[i] where i is the index of the required output. + result = UnwrapMonitor(InputWorkspace=ws,LRef=11) + + print "JoinWaveLength is: " + str(result[1]) + +Output: + +.. testoutput:: UnwrapMonitor + + JoinWaveLength is: 1.4241722326403834 + .. categories:: -- GitLab