Skip to content
Snippets Groups Projects
Commit b7960a06 authored by Lynch, Vickie's avatar Lynch, Vickie
Browse files

Refs #9714 one more doc test

parent d25d6c10
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,7 @@ of the input one.
Usage
-----
**Example - Crop a 5-bin worksapce**
**Example - Crop a 5-bin workspace**
.. testcode:: ExCropWorkspace
......
......@@ -21,4 +21,26 @@ reference. The cross correlation function is computed in the range
More details can be found
`here. <http://en.wikipedia.org/wiki/Cross-correlation>`__
Usage
-----
**Example - Crosscorrelate 2 spectra**
.. testcode:: ExCrossCorrelate
#Create a workspace with 2 spectra with five bins of width 0.5
ws = CreateSampleWorkspace(BankPixelWidth=1, XUnit='dSpacing', XMax=5, BinWidth=0.5)
ws = ScaleX(InputWorkspace='ws', Factor=0.5, Operation='Add', IndexMin=1, IndexMax=1)
# Run algorithm removing first and last bins
OutputWorkspace = CrossCorrelate(InputWorkspace='ws', WorkspaceIndexMax=1, XMin=2, XMax=4)
# Show workspaces
print "AutoCorrelation",OutputWorkspace.readY(0)
print "CrossCorrelation",OutputWorkspace.readY(1)
.. testoutput:: ExCrossCorrelate
AutoCorrelation [-0.01890212 1. -0.01890212]
CrossCorrelation [-0.68136257 0.16838401 0.45685055]
.. 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