Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
c0eb3e3d
Commit
c0eb3e3d
authored
10 years ago
by
Owen Arnold
Browse files
Options
Downloads
Patches
Plain Diff
refs #11393. Add docs for alg.
parent
fa1e5879
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Code/Mantid/docs/source/algorithms/SmoothMD-v1.rst
+12
-7
12 additions, 7 deletions
Code/Mantid/docs/source/algorithms/SmoothMD-v1.rst
with
12 additions
and
7 deletions
Code/Mantid/docs/source/algorithms/SmoothMD-v1.rst
+
12
−
7
View file @
c0eb3e3d
...
@@ -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.getNumberHistogram
s()
print "The output workspace has %i
points" % smoothed.getNPoint
s()
Output:
Output:
.. testoutput:: SmoothMDExample
.. testoutput:: SmoothMDExample
The output workspace has ??
spectra
The output workspace has ??
points
.. categories::
.. categories::
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment