Skip to content

Commit

Permalink
Refs #9584 Add example for Symmetrise.
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Jackson committed Jun 6, 2014
1 parent 1eca175 commit a649506
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Code/Mantid/docs/source/algorithms/Symmetrise-v1.rst
Expand Up @@ -14,4 +14,26 @@ moduli of xmin & xmax are different. Typically xmax is > mod(xmin). A
negative value of x is chosen (Xcut) so that the curve for mod(Xcut) to
xmax is reflected and inserted for x less than the Xcut.

Usage
-----

**Example - Running Symmetrise on an asymmetric workspace.**

.. testcode:: ExSymmetriseSimple

import numpy as np

#create an asymmetric line shape
def rayleigh(x, sigma):
return (x / sigma**2) * np.exp( -x**2 / (2*sigma**2))

dataX = np.arange(0, 10, 0.01)
dataY = rayleigh(dataX, 1)

ws = CreateWorkspace(dataX, dataY)
ws = ScaleX(ws, -1, "Add") #centre the peak over 0

ws = RenameWorkspace(ws, OutputWorkspace="iris00001_graphite002_red")
Symmetrise('00001', '-0.001', InputType='Workspace')

.. categories::

0 comments on commit a649506

Please sign in to comment.