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
ab68fa0d
Commit
ab68fa0d
authored
10 years ago
by
Peter Parker
Browse files
Options
Downloads
Patches
Plain Diff
Refs #9587 - Correct usage example.
parent
94e193b8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Code/Mantid/docs/source/algorithms/UnwrapMonitor-v1.rst
+38
-2
38 additions, 2 deletions
Code/Mantid/docs/source/algorithms/UnwrapMonitor-v1.rst
with
38 additions
and
2 deletions
Code/Mantid/docs/source/algorithms/UnwrapMonitor-v1.rst
+
38
−
2
View file @
ab68fa0d
...
...
@@ -71,7 +71,7 @@ value that should be excluded, then the entire bin is excluded. What
this means in practice is that the edge bins will possibly have a
reduced number of counts.
Restrictions on the
i
nput
w
orkspace
Restrictions on the
I
nput
W
orkspace
###################################
The input workspace must contain histogram data where the X unit is
...
...
@@ -79,7 +79,7 @@ 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.
Child
a
lgorithms
u
sed
Child
A
lgorithms
U
sed
#####################
If the input workspace contains more than a single spectrum, Unwrap
...
...
@@ -87,4 +87,40 @@ makes use of the `rebin <rebin>`__ algorithm to set the bins on the
output workspace to common values which cover the maximum theoretically
accessible wavelength range.
Usage
-----
**Example - Unwrap Dummy Monitor**
.. testcode:: ExUnwrap
# Create dummy workspace.
ws = CreateSimulationWorkspace(Instrument="IRIS", BinParams="0,500,2000", UnitX="TOF")
# Get the reference length.
instrument = ws.getInstrument()
sample = instrument.getSample()
source = instrument.getSource()
detector = ws.getDetector(0)
sample_to_source = sample.getPos() - source.getPos()
r = detector.getDistance(sample)
x = sample_to_source.getZ()
l_ref = x + r
unwrapped_ws, join = UnwrapMonitor(ws, LRef=l_ref)
print "The join wavelength was %d." % join
print "The length used for the reference flight path was %d." % l_ref
print "The first spectra did contain %s." % str(ws.readY(0))
print "The first spectra now contains %s." % str(unwrapped_ws.readY(0))
Output:
.. testoutput:: ExUnwrap
The join wavelength was 0.
The length used for the reference flight path was 37.
The first spectra did contain [ 1. 1. 1. 1.].
The first spectra now contains [ 1.33333333 1.33333333 0.33333333].
.. 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