Skip to content

Commit

Permalink
Refs #9583 tests for 3 algorithms
Browse files Browse the repository at this point in the history
  • Loading branch information
VickieLynch committed Jun 18, 2014
1 parent a5fedd4 commit f4d521c
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 1 deletion.
Expand Up @@ -9,6 +9,6 @@
Description
-----------

BroadcastWorkspace is used to copy a workspace from one process to all the others.
BroadcastWorkspace is only available for MPI builds. It is used to copy a workspace from one process to all the others.

.. categories::
27 changes: 27 additions & 0 deletions Code/Mantid/docs/source/algorithms/FindUBUsingFFT-v1.rst
Expand Up @@ -38,4 +38,31 @@ conventional cell. While this algorithm will occasionally work for as
few as four peaks, it works quite consistently with at least ten peaks,
and in general works best with a larger number of peaks.

Usage
-----

**Example:**

.. testcode:: ExFindUBUsingFFT

ws=LoadIsawPeaks("TOPAZ_3007.peaks")
print "After LoadIsawPeaks does the workspace have an orientedLattice: %s" % ws.sample().hasOrientedLattice()

FindUBUsingFFT(ws,MinD=8.0,MaxD=13.0)
print "After FindUBUsingFFT does the workspace have an orientedLattice: %s" % ws.sample().hasOrientedLattice()

print ws.sample().getOrientedLattice().getUB()


Output:

.. testoutput:: ExFindUBUsingFFT

After LoadIsawPeaks does the workspace have an orientedLattice: False
After FindUBUsingFFT does the workspace have an orientedLattice: True
[[ 0.01223576 0.00480107 0.08604016]
[-0.11654506 0.00178069 -0.00458823]
[-0.02737294 -0.08973552 -0.02525994]]


.. categories::
27 changes: 27 additions & 0 deletions Code/Mantid/docs/source/algorithms/FindUBUsingIndexedPeaks-v1.rst
Expand Up @@ -19,4 +19,31 @@ system of equations representing the mapping from (h,k,l) to Q for each
indexed peak. The system of linear equations is then solved in the least
squares sense, using QR factorization.

Usage
-----

**Example:**

.. testcode:: ExFindUBUsingIndexedPeaks

ws=LoadIsawPeaks("TOPAZ_3007.peaks")
print "After LoadIsawPeaks does the workspace have an orientedLattice: %s" % ws.sample().hasOrientedLattice()

FindUBUsingIndexedPeaks(ws)
print "After FindUBUsingIndexedPeaks does the workspace have an orientedLattice: %s" % ws.sample().hasOrientedLattice()

print ws.sample().getOrientedLattice().getUB()


Output:

.. testoutput:: ExFindUBUsingIndexedPeaks

After LoadIsawPeaks does the workspace have an orientedLattice: False
After FindUBUsingIndexedPeaks does the workspace have an orientedLattice: True
[[-0.04542062 0.04061954 -0.01223576]
[ 0.00140377 -0.00318446 0.11654506]
[ 0.05749773 0.03223779 0.02737294]]


.. categories::
Expand Up @@ -41,4 +41,30 @@ that are indexed, continues until all peaks have been added to the list.
Finally, one last optimization of the UB matrix is carried out using the
full list of peaks.

Usage
-----

**Example:**

.. testcode:: ExFindUBUsingLatticeParameters

ws=LoadIsawPeaks("TOPAZ_3007.peaks")
print "After LoadIsawPeaks does the workspace have an orientedLattice: %s" % ws.sample().hasOrientedLattice()

FindUBUsingLatticeParameters(ws,a=14.131,b=19.247,c=8.606,alpha=90.0,beta=105.071,gamma=90.0,NumInitial=15)
print "After FindUBUsingLatticeParameters does the workspace have an orientedLattice: %s" % ws.sample().hasOrientedLattice()

print ws.sample().getOrientedLattice().getUB()


Output:

.. testoutput:: ExFindUBUsingLatticeParameters

After LoadIsawPeaks does the workspace have an orientedLattice: False
After FindUBUsingLatticeParameters does the workspace have an orientedLattice: True
[[ 0.04542062 0.04061954 0.01223576]
[-0.00140377 -0.00318446 -0.11654506]
[-0.05749773 0.03223779 -0.02737294]]

.. categories::
1 change: 1 addition & 0 deletions Code/Mantid/docs/source/algorithms/GatherWorkspaces-v1.rst
Expand Up @@ -9,6 +9,7 @@
Description
-----------

GatherWorkspaces is only available for MPI builds.
It stitches together the input workspaces provided by each of the processes into a single workspace in the root process.
The spectra in the output workspace will be ordered by the rank of the input processes.
It is up to the caller to ensure this results in the required ordering.
Expand Down

0 comments on commit f4d521c

Please sign in to comment.