Skip to content

Commit

Permalink
Refs #8760. Usage example for focussing routine
Browse files Browse the repository at this point in the history
  • Loading branch information
arturbekasov committed Jun 13, 2014
1 parent 5d0ea65 commit 5fdb1e8
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Code/Mantid/docs/source/algorithms/EnginXFocus-v1.rst
Expand Up @@ -17,4 +17,29 @@ Description
Performs a TOF to dSpacing conversion using calibrated pixel positions, focuses the values in dSpacing
and then converts them back to TOF.

**Example - Simple focussing of and EnginX data file:**

.. testcode:: ExSimple

# Run the algorithm
ws = EnginXFocus(Run="ENGINX00213855.nxs",
Bank=1)

# Should have one spectrum only
print "No. of spectra:", ws.getNumberHistograms()

# Print a few arbitrary bins where higher intensities are expected
fmt = "For TOF of {0:.3f} intensity is {1:.3f}"
for bin in [3169, 6037, 7124]:
print fmt.format(ws.readX(0)[bin], ws.readY(0)[bin])

Output:

.. testoutput:: ExSimple

No. of spectra: 1
For TOF of 20165.642 intensity is 7.436
For TOF of 33547.826 intensity is 9.388
For TOF of 38619.804 intensity is 17.397

.. categories::
Binary file added Test/AutoTestData/UsageData/ENGINX00213855.nxs
Binary file not shown.

0 comments on commit 5fdb1e8

Please sign in to comment.