Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feature/9592_remove_final_wiki'
Browse files Browse the repository at this point in the history
  • Loading branch information
martyngigg committed Jun 17, 2014
2 parents ef7fec5 + f7c4505 commit c87ea1b
Show file tree
Hide file tree
Showing 13 changed files with 153 additions and 61 deletions.
@@ -1,8 +1,3 @@
/*WIKI*
Removes all algorithm history records from a given workspace. This includes all workflow and child algorithm history records. After this algorithm has been run, the workspace will not be reproducable
from its history. Note that this algorithm will not remove the environment history associated with a workspace.
*WIKI*/

#include "MantidAPI/WorkspaceHistory.h"
#include "MantidAlgorithms/RemoveWorkspaceHistory.h"

Expand Down
8 changes: 0 additions & 8 deletions Code/Mantid/Framework/Algorithms/src/Stitch1D.cpp
@@ -1,11 +1,3 @@
/*WIKI*
Stitches single histogram [[MatrixWorkspace|Matrix Workspaces]] together outputting a stitched Matrix Workspace. Either the right-hand-side or left-hand-side workspace can be chosen to be scaled. Users
must provide a Param step (single value), but the binning start and end are calculated from the input workspaces if not provided. Likewise, StartOverlap and EndOverlap are optional. If the StartOverlap or EndOverlap
are not provided, then these are taken to be the region of x-axis intersection.
The workspaces must be histogrammed. Use [[ConvertToHistogram]] on workspaces prior to passing them to this algorithm.
*WIKI*/

#include "MantidAlgorithms/Stitch1D.h"
#include "MantidAPI/WorkspaceProperty.h"
#include "MantidAPI/MatrixWorkspace.h"
Expand Down
@@ -1,11 +1,5 @@
#ifndef MANTID_CRYSTAL_CENTROIDPEAKS_H_
#define MANTID_CRYSTAL_CENTROIDPEAKS_H_
/*WIKI*
This algorithm starts with a PeaksWorkspace containing the expected positions of peaks in reciprocal space. It calculates the centroid of the peak by calculating the average of the coordinates of all events within a given radius of the peak, weighted by the weight (signal) of the event.
*WIKI*/

#include "MantidAPI/Algorithm.h"
#include "MantidDataObjects/PeaksWorkspace.h"
Expand Down
@@ -1,15 +1,3 @@
/*WIKI*
Workflow algorithm to determine chunking strategy
for event nexus file. This will break up the instrument
into logical components according to the instrument hierarchy.
This algorithm does assume that there are components in the
geometry named "bank#" and returns a table workspace of those
names. Trying this on an instrument without components named
that will generate an exception. Also, requesting "ChunkBy=All"
will return an empty table workspace.
*WIKI*/

#include "MantidAPI/FileProperty.h"
#include "MantidAPI/MatrixWorkspace.h"
#include "MantidAPI/TableRow.h"
Expand Down
@@ -1,10 +1,3 @@
/*WIKI*
This algorithm looks for an internally-stored monitor workspace on the input workspace and
sets it as the output workspace if found. The input workspace will no longer hold a reference
to the monitor workspace after this algorithm has been run on it.
If no monitor workspace is present the algorithm will fail.
*WIKI*/

#include "MantidDataHandling/ExtractMonitorWorkspace.h"

namespace Mantid
Expand Down
4 changes: 0 additions & 4 deletions Code/Mantid/Framework/UserAlgorithms/HelloWorldAlgorithm.cpp
@@ -1,7 +1,3 @@
/*WIKI*
*WIKI*/
#include "HelloWorldAlgorithm.h"

namespace Mantid
Expand Down
4 changes: 0 additions & 4 deletions Code/Mantid/Framework/UserAlgorithms/ModifyData.cpp
@@ -1,7 +1,3 @@
/*WIKI*
*WIKI*/
#include "ModifyData.h"

namespace Mantid
Expand Down
7 changes: 0 additions & 7 deletions Code/Mantid/Framework/UserAlgorithms/Muon_ExpDecayOscTest.cpp
@@ -1,10 +1,3 @@
/* This is another User test fitting function.
For a general description of how to create a test
fitting function see LorentzianTest.h and LorentzianTest.cpp
*/

//----------------------------------------------------------------------
// Includes
//----------------------------------------------------------------------
Expand Down
4 changes: 0 additions & 4 deletions Code/Mantid/Framework/UserAlgorithms/PropertyAlgorithm.cpp
@@ -1,7 +1,3 @@
/*WIKI*
*WIKI*/
#include "PropertyAlgorithm.h"
#include "MantidKernel/ArrayProperty.h"
#include "MantidKernel/BoundedValidator.h"
Expand Down
4 changes: 0 additions & 4 deletions Code/Mantid/Framework/UserAlgorithms/WorkspaceAlgorithm.cpp
@@ -1,7 +1,3 @@
/*WIKI*
*WIKI*/
#include "WorkspaceAlgorithm.h"

namespace Mantid
Expand Down
@@ -0,0 +1,55 @@
.. algorithm::

.. summary::

.. alias::

.. properties::

Description
-----------

Workflow algorithm to determine chunking strategy
for event nexus file. This will break up the instrument
into logical components according to the instrument hierarchy.

This algorithm does assume that there are components in the
geometry named "bank#" and returns a table workspace of those
names. Trying this on an instrument without components named
that will generate an exception. Also, requesting "ChunkBy=All"
will return an empty table workspace.

Usage
-----

**Example: Powgen**

.. testcode:: ExPowgen

ws = CreateChunkingFromInstrument(InstrumentName="pg3", ChunkBy="Group")
print "Created %i Chunks" % ws.rowCount()

Output:

.. testoutput:: ExPowgen

Created 4 Chunks

**Example: Snap**

.. testcode:: ExSnap

ws = CreateChunkingFromInstrument(InstrumentName="snap", ChunkNames="East,West", MaxBankNumber=20)
print "Created %i Chunks" % ws.rowCount()

Output:

.. testoutput:: ExSnap

Created 2 Chunks

.. categories::




35 changes: 35 additions & 0 deletions Code/Mantid/docs/source/algorithms/ExtractMonitorWorkspace-v1.rst
@@ -0,0 +1,35 @@
.. algorithm::

.. summary::

.. alias::

.. properties::

Description
-----------

This algorithm looks for an internally-stored monitor workspace on the input workspace and
sets it as the output workspace if found. The input workspace will no longer hold a reference
to the monitor workspace after this algorithm has been run on it.
If no monitor workspace is present the algorithm will fail.

This does not extract monitor data that is stored with the detector data in the workspace.

Usage
-----

**Example: Extracting an internally stored monitor workspace**

.. This is encoded as a non tested block as it is currently not possible to create a workspace with an internal monitor workspace in python.
.. code-block:: python
#If no monitor workspace is present the algorithm will fail.
wsMonitor = ExtractMonitorWorkspace(ws)
.. categories::




63 changes: 63 additions & 0 deletions Code/Mantid/docs/source/algorithms/RemoveWorkspaceHistory-v1.rst
@@ -0,0 +1,63 @@
.. algorithm::

.. summary::

.. alias::

.. properties::

Description
-----------

Removes all algorithm history records from a given workspace. This includes all workflow and child algorithm history records. After this algorithm has been run, the workspace will not be reproducable
from its history. Note that this algorithm will not remove the environment history associated with a workspace.

Usage
-----

**Example:**

.. testcode:: ExStripHistory

def print_workspace_history(ws):
history = ws.getHistory()
print "Workspace %s has %i algorithms in it's history" %(ws,history.size())
for alg in history.getAlgorithmHistories():
print " " + alg.name()

# create histogram workspace
ws = CreateSampleWorkspace(NumBanks=1,BankPixelWidth=1)

#create some history by running a few algs
ws = ConvertUnits(ws,"Wavelength")
ws = Rebin(ws,Params=1)
ws += ws
ws *= ws
print_workspace_history(ws)

RemoveWorkspaceHistory(ws)

print "After RemoveWorkspaceHistory"
print_workspace_history(ws)


Output:

.. testoutput:: ExStripHistory

Workspace ws has 5 algorithms in it's history
CreateSampleWorkspace
ConvertUnits
Rebin
Plus
Multiply
After RemoveWorkspaceHistory
Workspace ws has 1 algorithms in it's history
RemoveWorkspaceHistory


.. categories::



0 comments on commit c87ea1b

Please sign in to comment.