Skip to content
Snippets Groups Projects
Commit df80fd4e authored by Roman Tolchenov's avatar Roman Tolchenov
Browse files

Re #9579. Usage examples for SmoothData

parent e4b9c757
No related branches found
No related tags found
No related merge requests found
......@@ -19,4 +19,34 @@ value in the spectrum will be smoothed by making it the average of the
first 3 values, the next will use the first 4 and then the third and
onwards will use the full 5 points in the averaging.
Usage
-----
Example 1: use same NPoints for all spectra
###########################################
.. testcode::
# Create a workspace
ws = CreateSampleWorkspace()
# Smooth the spectra in ws NPoints = 3
smooth = SmoothData( ws, 3)
Example 2: use different NPoints for groups of spectra
######################################################
.. testcode::
# Create a workspace
ws = CreateSampleWorkspace()
# Greate a grouping workspace to put detectors from banks
# bank1 and bank2 into two separate groups
gr = CreateGroupingWorkspace(ws,GroupNames='bank1,bank2')
# Smooth the spectra in ws: first group with NPoints = 3 and
# second group with NPoints = 5
smooth = SmoothData( ws, [3,5], GroupingWorkspace='gr')
.. 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