diff --git a/Code/Mantid/Framework/DataHandling/src/LoadIsawDetCal.cpp b/Code/Mantid/Framework/DataHandling/src/LoadIsawDetCal.cpp index fd40786e219db7a69318ec8b6e8a23c3bcb6bc25..03034da91ad0cd624030c0ad6366cac67ffe6c4b 100644 --- a/Code/Mantid/Framework/DataHandling/src/LoadIsawDetCal.cpp +++ b/Code/Mantid/Framework/DataHandling/src/LoadIsawDetCal.cpp @@ -1,13 +1,9 @@ /*WIKI* - - - Moves the detectors in an instrument using the origin and 2 vectors of the rotated plane from an ISAW DetCal file. - - -==Usage== +*WIKI*/ +/*WIKI_USAGE* '''Python''' LoadIsawDetCal("SNAP_4111","SNAP.DetCal") @@ -16,12 +12,7 @@ Moves the detectors in an instrument using the origin and 2 vectors of the rotat alg->setPropertyValue("InputWorkspace", "SNAP_4111"); alg->setPropertyValue("Filename", "SNAP.DetCal"); alg->execute(); - - - - - -*WIKI*/ +*WIKI_USAGE*/ //---------------------------------------------------------------------- // Includes //---------------------------------------------------------------------- diff --git a/Code/Mantid/Framework/MDAlgorithms/src/AndMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/AndMD.cpp index 17756032d94f2fa93b16ace5db0a2ed2ea7990a1..f6eb61077e80c2702f435c6b5db24e666033c824 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/AndMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/AndMD.cpp @@ -4,14 +4,15 @@ Perform the And boolean operation on two MDHistoWorkspaces. The & operation is performed element-by-element. A signal of 0.0 means "false" and any non-zero signal is "true". -== Usage == +*WIKI*/ +/*WIKI_USAGE* C = A & B A &= B See [[MDHistoWorkspace#Boolean_Operations|this page]] for examples on using boolean operations. -*WIKI*/ +*WIKI_USAGE*/ #include "MantidMDAlgorithms/AndMD.h" #include "MantidKernel/System.h" diff --git a/Code/Mantid/Framework/MDAlgorithms/src/CreateMDHistoWorkspace.cpp b/Code/Mantid/Framework/MDAlgorithms/src/CreateMDHistoWorkspace.cpp index 2ca772b365a10c55c36f482117683c2b2ece5e90..616ceb0e7e44f1c4bd88617a1624628456c5fc12 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/CreateMDHistoWorkspace.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/CreateMDHistoWorkspace.cpp @@ -1,8 +1,13 @@ /*WIKI* Takes two arrays of signal and error values, as well as information describing the dimensionality and extents, and creates a MDHistoWorkspace (histogrammed multi-dimensional workspace). The ''SignalInput'' and ''ErrorInput'' arrays must be of equal length and have a length that is equal to the product of all the comma separated arguments provided to '''NumberOfBins'''. The order in which the arguments are specified to each of the properties (for those taking multiple arguments) is important, as they are assumed to match by the order they are declared. For example, specifying '''Names'''='A,B' and '''Units'''='U1,U2' will generate two dimensions, the first with a name of ''A'' and units of ''U1'' and the second with a name of ''B'' and units of ''U2''. The same logic applies to the '''Extents''' inputs. Signal and Error inputs are read in such that, the first entries in the file will be entered across the first dimension specified, and the zeroth index in the other dimensions. The second set of entries will be entered across the first dimension and the 1st index in the second dimension, and the zeroth index in the others. -== Usage == +== Alternatives == +A very similar algorithm to this is [[ImportMDHistoWorkspace]], which takes it's input signal and error values from a text file rather than from arrays. Another alternative is to use [[CnvrtToMD]] which works on MatrixWorkspaces, and allows log values to be included in the dimensionality. + +[[Category:MDAlgorithms]] +*WIKI*/ +/*WIKI_USAGE* The following example creates a 2D MDHistoWorkspace called ''demo'' with 3 bins in each dimension and and extents spanning from -1 to 1 in each dimension. The first dimension is called A, and has units of U, the second is called B and has units of T. CreateMDHistoWorkspace(SignalInput='1,2,3,4,5,6,7,8,9',ErrorInput='1,1,1,1,1,1,1,1,1',Dimensionality='2',Extents='-1,1,-1,1',NumberOfBins='3,3',Names='A,B',Units='U,T',OutputWorkspace='demo') @@ -23,13 +28,7 @@ The following example creates a 1D sine function signals.append(math.sin(x)) errors.append(math.cos(x)) CreateMDHistoWorkspace(SignalInput=signals,ErrorInput=errors,Dimensionality=dimensionality,Extents=extents,NumberOfBins=nbins,Names='x',Units='dimensionless',OutputWorkspace='demo') - -== Alternatives == -A very similar algorithm to this is [[ImportMDHistoWorkspace]], which takes it's input signal and error values from a text file rather than from arrays. Another alternative is to use [[CnvrtToMD]] which works on MatrixWorkspaces, and allows log values to be included in the dimensionality. - -[[Category:MDAlgorithms]] - -*WIKI*/ +*WIKI_USAGE*/ #include "MantidMDAlgorithms/CreateMDHistoWorkspace.h" #include "MantidKernel/ArrayProperty.h" diff --git a/Code/Mantid/Framework/MDAlgorithms/src/DivideMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/DivideMD.cpp index a9a5c64990ea2d8e4222e918dd36dbc6955a5a9e..3ca0d26e5a06a99b795063956ba607b50fc66776 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/DivideMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/DivideMD.cpp @@ -12,7 +12,8 @@ The error of <math> f = a / b </math> is propagated with <math> df^2 = f^2 * (da * '''[[MDEventWorkspace]]'s''' ** This operation is not supported, as it is not clear what its meaning would be. -== Usage == +*WIKI*/ +/*WIKI_USAGE* C = A / B C = A / 123.4 @@ -20,8 +21,7 @@ The error of <math> f = a / b </math> is propagated with <math> df^2 = f^2 * (da A /= 123.4 See [[MDHistoWorkspace#Arithmetic_Operations|this page]] for examples on using arithmetic operations. - -*WIKI*/ +*WIKI_USAGE*/ #include "MantidMDAlgorithms/DivideMD.h" #include "MantidKernel/System.h" diff --git a/Code/Mantid/Framework/MDAlgorithms/src/EqualToMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/EqualToMD.cpp index 4b4ffcddeeca7f830bf19c842994200da6b7f915..ab239e9289e52020c1be034e2d4f4b7d8af8bcd8 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/EqualToMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/EqualToMD.cpp @@ -7,12 +7,10 @@ For two MDHistoWorkspaces, the operation is performed element-by-element. Only t For a MDHistoWorkspace and a scalar, the operation is performed on each element of the output. -== Usage == - -See [[MDHistoWorkspace#Boolean_Operations|this page]] for examples on using boolean operations. - *WIKI*/ - +/*WIKI_USAGE* +See [[MDHistoWorkspace#Boolean_Operations|this page]] for examples on using boolean operations. +*WIKI_USAGE*/ #include "MantidMDAlgorithms/EqualToMD.h" #include "MantidKernel/System.h" diff --git a/Code/Mantid/Framework/MDAlgorithms/src/GreaterThanMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/GreaterThanMD.cpp index 1d5e28513e29dd93f40df3dd6e8033b3d6ae907b..cb02fbaddbc589964ffe13f2d4a2b1c8b8e43b03 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/GreaterThanMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/GreaterThanMD.cpp @@ -7,16 +7,15 @@ For two MDHistoWorkspaces, the operation is performed element-by-element. For a MDHistoWorkspace and a scalar, the operation is performed on each element of the output. -== Usage == - +*WIKI*/ +/*WIKI_USAGE* # Compare two workspaces, element-by-element C = A < B # Compare a workspace and a number, element-by-element C = A < 123.4 See [[MDHistoWorkspace#Boolean_Operations|this page]] for examples on using boolean operations. - -*WIKI*/ +*WIKI_USAGE*/ #include "MantidMDAlgorithms/GreaterThanMD.h" #include "MantidKernel/System.h" diff --git a/Code/Mantid/Framework/MDAlgorithms/src/LessThanMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/LessThanMD.cpp index 45273240764190ddc6198a336d9955737a9ab252..2b95bcad912d8305005c602170369259ca9faff5 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/LessThanMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/LessThanMD.cpp @@ -6,17 +6,15 @@ The output workspace has a signal of 0.0 to mean "false" and a signal of 1.0 to For two MDHistoWorkspaces, the operation is performed element-by-element. For a MDHistoWorkspace and a scalar, the operation is performed on each element of the output. - -== Usage == - +*WIKI*/ +/*WIKI_USAGE* # Compare two workspaces, element-by-element C = A > B # Compare a workspace and a number, element-by-element C = A > 123.4 See [[MDHistoWorkspace#Boolean_Operations|this page]] for examples on using boolean operations. - -*WIKI*/ +*WIKI_USAGE*/ #include "MantidMDAlgorithms/LessThanMD.h" #include "MantidKernel/System.h" diff --git a/Code/Mantid/Framework/MDAlgorithms/src/MinusMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/MinusMD.cpp index fad80c800b2c06a4ed7b5fdff7475c9f9f34dce7..a17bd97c70ad278af63e0e6e85ab1420fff2212d 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/MinusMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/MinusMD.cpp @@ -12,17 +12,15 @@ Subtract two [[MDHistoWorkspace]]'s or a MDHistoWorkspace and a scalar. ** The number of events in the output MDEventWorkspace is that of the LHS and RHS workspaces put together. * '''[[MDEventWorkspace]] - Scalar or MDHistoWorkspace''' ** This is not possible. - -== Usage == - +*WIKI*/ +/*WIKI_USAGE* C = A - B C = A - 123.4 A -= B A -= 123.4 See [[MDHistoWorkspace#Arithmetic_Operations|this page]] for examples on using arithmetic operations. - -*WIKI*/ +*WIKI_USAGE*/ #include "MantidMDAlgorithms/MinusMD.h" #include "MantidKernel/System.h" diff --git a/Code/Mantid/Framework/MDAlgorithms/src/MultiplyMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/MultiplyMD.cpp index fbe1f51bdbebdb588cfeb3bc8a90ac5396e4590f..c8d4e647334b75fe180a552440ca69b18fd6508c 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/MultiplyMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/MultiplyMD.cpp @@ -9,9 +9,8 @@ The error of <math> f = a * b </math> is propagated with <math>df^2 = f^2 * (da^ ** Every element of the MDHistoWorkspace is multiplied by the scalar. * '''[[MDEventWorkspace]]'s''' ** This operation is not supported, as it is not clear what its meaning would be. - -== Usage == - +*WIKI*/ +/*WIKI_USAGE* C = A * B C = A * 123.4 A *= B @@ -19,7 +18,7 @@ The error of <math> f = a * b </math> is propagated with <math>df^2 = f^2 * (da^ See [[MDHistoWorkspace#Arithmetic_Operations|this page]] for examples on using arithmetic operations. -*WIKI*/ +*WIKI_USAGE*/ #include "MantidKernel/System.h" #include "MantidMDAlgorithms/MultiplyMD.h" diff --git a/Code/Mantid/Framework/MDAlgorithms/src/NotMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/NotMD.cpp index 31a9dadc94de586dfefd0e44fb8a5d32013226d3..1351706251fcff5411966c40478f95c51a553797 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/NotMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/NotMD.cpp @@ -5,14 +5,14 @@ The not operation is performed element-by-element. Any 0.0 signal is changed to 1.0 (meaning true). Any non-zero signal is changed to 0.0 (meaning false). -== Usage == - +*WIKI*/ +/*WIKI_USAGE* B = ~A A = ~A See [[MDHistoWorkspace#Boolean_Operations|this page]] for examples on using boolean operations. -*WIKI*/ +*WIKI_USAGE*/ #include "MantidMDAlgorithms/NotMD.h" #include "MantidKernel/System.h" diff --git a/Code/Mantid/Framework/MDAlgorithms/src/OrMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/OrMD.cpp index af5c6bc7524de9cdd40f2b6c051e4c73089c4aaa..bfdc0d683c407eaf6d9a1801313962fb0116501b 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/OrMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/OrMD.cpp @@ -3,16 +3,14 @@ Perform the Or boolean operation on two MDHistoWorkspaces. The || operation is performed element-by-element. A signal of 0.0 means "false" and any non-zero signal is "true". - -== Usage == - +*WIKI*/ +/*WIKI_USAGE* C = A | B A |= B See [[MDHistoWorkspace#Boolean_Operations|this page]] for examples on using boolean operations. -*WIKI*/ - +*WIKI_USAGE*/ #include "MantidMDAlgorithms/OrMD.h" #include "MantidKernel/System.h" diff --git a/Code/Mantid/Framework/MDAlgorithms/src/PlusMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/PlusMD.cpp index e3e41db5ae700c390da09c5df83ae9f7bf745296..e582d8b65111966e4880d262b436ff54547314d7 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/PlusMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/PlusMD.cpp @@ -23,17 +23,15 @@ See [[CloneMDWorkspace]] for details, but note that a file-backed [[MDEventWorks Also, be aware that events added to a MDEventWorkspace are currently added '''in memory''' and are not cached to file until [[SaveMD]] or another algorithm requiring it is called. The workspace is marked as 'requiring file update'. - -== Usage == - +*WIKI*/ +/*WIKI_USAGE* C = A + B C = A + 123.4 A += B A += 123.4 See [[MDHistoWorkspace#Arithmetic_Operations|this page]] for examples on using arithmetic operations. - -*WIKI*/ +*WIKI_USAGE*/ #include "MantidAPI/IMDEventWorkspace.h" #include "MantidKernel/System.h" diff --git a/Code/Mantid/Framework/MDAlgorithms/src/WeightedMeanMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/WeightedMeanMD.cpp index 3cb96e97a0479ab478bf6c9787ead2c0812db175..5b8ac4c2cd5fb19605d566a5e000fae0e6109acf 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/WeightedMeanMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/WeightedMeanMD.cpp @@ -2,8 +2,8 @@ Takes two MDHistoWorkspaces and calculates the weighted mean for each bin. See [[WeightedMean]] for more details on the algorithm workings. Both inputs must be MDHistoWorkspaces, the algorithm will not run with MDEventWorkspaces. -== Usage == - +*WIKI*/ +/*WIKI_USAGE* The following utilises [[WeightedMean]] and [[WeightedMeanMD]] to inspect the same data. import math @@ -37,8 +37,7 @@ The following utilises [[WeightedMean]] and [[WeightedMeanMD]] to inspect the sa # Produce the weithed mean as a 1D MD workspace. Contents sould be identical to the output created above. mean_md = WeightedMeanMD(LHSWorkspace=md_1,RHSWorkspace=md_2) - -*WIKI*/ +*WIKI_USAGE*/ #include "MantidMDAlgorithms/WeightedMeanMD.h" #include "MantidMDEvents/MDHistoWorkspaceIterator.h" diff --git a/Code/Mantid/Framework/MDAlgorithms/src/XorMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/XorMD.cpp index 10f8fd7d711c45deb6187792bafa5e5420057fff..e86070f0077413ec2e87aee7d81f97594c8f1ca7 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/XorMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/XorMD.cpp @@ -4,14 +4,14 @@ Perform the Xor (exclusive-or) boolean operation on two MDHistoWorkspaces. The xor operation is performed element-by-element. A signal of 0.0 means "false" and any non-zero signal is "true". -== Usage == - +*WIKI*/ +/*WIKI_USAGE* C = A ^ B A ^= B See [[MDHistoWorkspace#Boolean_Operations|this page]] for examples on using boolean operations. -*WIKI*/ +*WIKI_USAGE*/ #include "MantidMDAlgorithms/XorMD.h" #include "MantidKernel/System.h" diff --git a/Code/Mantid/Framework/MDEvents/src/ImportMDEventWorkspace.cpp b/Code/Mantid/Framework/MDEvents/src/ImportMDEventWorkspace.cpp index f2e19a30689f9fcf2a9236bd4ff97040e1ca16e9..42827bef15a0f847822fcbc64b3672e52bb05efa 100644 --- a/Code/Mantid/Framework/MDEvents/src/ImportMDEventWorkspace.cpp +++ b/Code/Mantid/Framework/MDEvents/src/ImportMDEventWorkspace.cpp @@ -17,8 +17,12 @@ The usage example below shows demo files with both of these formats. Comments are denoted by lines starting with '''#'''. There is no multi-line comment. -== Usage == +== Alternatives == +Other alternatives to importing/creating MDWorkspaces are [[ImportMDHistoWorkspace]], [[CreateMDHistoWorkspace]] and [[CreateMDWorkspace]] + +*WIKI*/ +/*WIKI_USAGE* The following example creates a 2D MDEventWorkspace called ''demo'' with 10 * 2 bins. @@ -84,12 +88,7 @@ The equivalent with run numbers and detector ids specified is: 2.7 1.10 1 19 -0.3 1 2.8 1.00 1 20 -0.2 1 2.9 0.90 1 20 -0.1 1 - -== Alternatives == -Other alternatives to importing/creating MDWorkspaces are [[ImportMDHistoWorkspace]], [[CreateMDHistoWorkspace]] and [[CreateMDWorkspace]] - - -*WIKI*/ +*WIKI_USAGE*/ #include "MantidMDEvents/ImportMDEventWorkspace.h" #include "MantidKernel/System.h" diff --git a/Code/Mantid/Framework/MDEvents/src/ImportMDHistoWorkspace.cpp b/Code/Mantid/Framework/MDEvents/src/ImportMDHistoWorkspace.cpp index 722c2c185f7cdd7673f5b7d4323d1dff903a48f4..e85f8ca75b15a23d433ceab8f490192f07b91254 100644 --- a/Code/Mantid/Framework/MDEvents/src/ImportMDHistoWorkspace.cpp +++ b/Code/Mantid/Framework/MDEvents/src/ImportMDHistoWorkspace.cpp @@ -11,8 +11,13 @@ The Names, Units, Extents and NumberOfBins inputs are all linked by the order th Signal and Error inputs are read in such that, the first entries in the file will be entered across the first dimension specified, and the zeroth index in the other dimensions. The second set of entries will be entered across the first dimension and the 1st index in the second dimension, and the zeroth index in the others. -== Usage == +== Alternatives == +A very similar algorithm to this is [[CreateMDHistoWorkspace]], which takes it's input signal and error values from arrays rather than a text file. Another alternative is to use [[ConvertToMD]] which works on MatrixWorkspaces, and allows log values to be included in the dimensionality. + +[[Category:MDAlgorithms]] +*WIKI*/ +/*WIKI_USAGE* The following call will create an MDHistoWorkspace called ''demo'' with 3 dimensions with 2 bins in each dimension. Each dimension will span from -1 to 1 in units of T. @@ -29,13 +34,7 @@ And here's the corresponding contents of ''demo.txt'': 6 6.1 7 7.1 8 8.1 - -== Alternatives == -A very similar algorithm to this is [[CreateMDHistoWorkspace]], which takes it's input signal and error values from arrays rather than a text file. Another alternative is to use [[ConvertToMD]] which works on MatrixWorkspaces, and allows log values to be included in the dimensionality. - -[[Category:MDAlgorithms]] - -*WIKI*/ +*WIKI_USAGE*/ #include "MantidMDEvents/ImportMDHistoWorkspace.h" #include "MantidAPI/FileProperty.h" diff --git a/Code/Mantid/Framework/PythonAPI/PythonAlgorithms/OSIRISDiffractionReduction.py b/Code/Mantid/Framework/PythonAPI/PythonAlgorithms/OSIRISDiffractionReduction.py index 18e5fa84447081e672627685a7c6407eb6109385..29d7a9ef0a05e1bc7d3e11d85bd506ceff9f5afa 100644 --- a/Code/Mantid/Framework/PythonAPI/PythonAlgorithms/OSIRISDiffractionReduction.py +++ b/Code/Mantid/Framework/PythonAPI/PythonAlgorithms/OSIRISDiffractionReduction.py @@ -1,5 +1,4 @@ """*WIKI* -== Usage == == Source Code == The source code for the Python Algorithm may be viewed at: [http://trac.mantidproject.org/mantid/browser/trunk/Code/Mantid/Framework/PythonAPI/PythonAlgorithms/OSIRISDiffractionReduction.py OSIRISDiffractionReduction.py] @@ -8,6 +7,7 @@ The source code for the reducer class which is used may be viewed at: [http://tr *WIKI*""" + from MantidFramework import * from mantidsimple import * diff --git a/Code/Mantid/Framework/PythonInterface/PythonAlgorithms/MaskWorkspaceToCalFile.py b/Code/Mantid/Framework/PythonInterface/PythonAlgorithms/MaskWorkspaceToCalFile.py index 016d3ea93a72ccc6c192313acbc9153f5f158569..43f057b4b5e72b98822c1f8ad11c65fd3f3af9e3 100644 --- a/Code/Mantid/Framework/PythonInterface/PythonAlgorithms/MaskWorkspaceToCalFile.py +++ b/Code/Mantid/Framework/PythonInterface/PythonAlgorithms/MaskWorkspaceToCalFile.py @@ -1,7 +1,8 @@ """*WIKI* This algorithms writes a cal file with the selection column set to the masking status of the workspaces provided. The offsets and grouping details of the cal file are not completed, so you would normally use MargeCalFiles afterwards to import these values from another file. -== Usage == +*WIKI*""" +"""*WIKI_USAGE* Example: #Load up two workspaces and mask some data ws1=Load("GEM38370") @@ -32,8 +33,7 @@ Example: MergeCalFiles(UpdateFile = dataDir+"mask.cal", MasterFile=dataDir+"offsets_2006_cycle064.cal", \ OutputFile=dataDir+"resultCal.cal", MergeOffsets=False, MergeSelections=True,MergeGroups=False) - -*WIKI*""" +*WIKI_USAGE*""" import sys from mantid.kernel import * from mantid.api import *