Skip to content
Snippets Groups Projects
Commit c0eb3e3d authored by Owen Arnold's avatar Owen Arnold
Browse files

refs #11393. Add docs for alg.

parent fa1e5879
No related branches found
No related tags found
No related merge requests found
...@@ -15,15 +15,20 @@ Provides smoothing of :ref:`MDHistoWorkspaces <MDHistoWorkspace>`__ in n-dimensi ...@@ -15,15 +15,20 @@ Provides smoothing of :ref:`MDHistoWorkspaces <MDHistoWorkspace>`__ in n-dimensi
Usage Usage
----- -----
.. Try not to use files in your examples,
but if you cannot avoid it then the (small) files must be added to
autotestdata\UsageData and the following tag unindented
.. include:: ../usagedata-note.txt
**Example - SmoothMD** **Example - SmoothMD**
.. testcode:: SmoothMDExample .. testcode:: SmoothMDExample
ws = CreateMDWorkspace(Dimensions=2, Extents=[-10,10,-10,10], Names='A,B', Units='U,U')
FakeMDEventData(InputWorkspace=ws, PeakParams='100000,-5,0,1')
FakeMDEventData(InputWorkspace=ws, PeakParams='100000,5,0,1')
histogram = BinMD(InputWorkspace='a', AlignedDim0='A,-10,10,100', AlignedDim1='B,-10,10,100', OutputExtents='-10,10,-10,10,-10,10', OutputBins='10,10,10')
#plotSlice(histogram)
smoothed = SmoothMD(InputWorkspace=histogram, WidthVector=5, Function='Hat')
#plotSlice(smoothed)
# Create a host workspace # Create a host workspace
ws = CreateWorkspace(DataX=range(0,3), DataY=(0,2)) ws = CreateWorkspace(DataX=range(0,3), DataY=(0,2))
or or
...@@ -31,14 +36,14 @@ Usage ...@@ -31,14 +36,14 @@ Usage
wsOut = SmoothMD() wsOut = SmoothMD()
# Print the result # Print the result. Displaying in the SliceViewer would be best
print "The output workspace has %i spectra" % wsOut.getNumberHistograms() print "The output workspace has %i points" % smoothed.getNPoints()
Output: Output:
.. testoutput:: SmoothMDExample .. testoutput:: SmoothMDExample
The output workspace has ?? spectra The output workspace has ?? points
.. categories:: .. categories::
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