diff --git a/Code/Mantid/docs/source/algorithms/ConvertToDiffractionMDWorkspace-v1.rst b/Code/Mantid/docs/source/algorithms/ConvertToDiffractionMDWorkspace-v1.rst index 2929ce54e432f4c3d0708b635a0865b1b7ae7ea1..a323f1391b37c69218e16a2531dd6436bb18cb36 100644 --- a/Code/Mantid/docs/source/algorithms/ConvertToDiffractionMDWorkspace-v1.rst +++ b/Code/Mantid/docs/source/algorithms/ConvertToDiffractionMDWorkspace-v1.rst @@ -87,4 +87,25 @@ Performance Notes - 32-core AMD Opteron 2.7 GHz computer: measured between 8 and 9 million events per second (400-1000 million event workspaces). + +Usage + +**Example - Convert re-binned MARI 2D workspace to 3D MD workspace for further analysis/merging with data at different temperatures :** + +.. testcode:: ExConvertToDiffractionMDWorkspace + + # Load Operation + events = CreateSampleWorkspace(OutputWorkspace='events', WorkspaceType='Event', Function='Multiple Peaks', Random=True) + # convert to MD workspace + md = ConvertToDiffractionMDWorkspace(InputWorkspace=events, OutputWorkspace='md', OneEventPerBin=False, LorentzCorrection=True, SplitThreshold=150,Version=1)) + + # A way to look at these results as a text: + print "Resulting MD workspace has {0} events and {1} dimensions".format(md.getNEvents(),md.getNumDims()) + +**Output:** + +.. testoutput:: ExConvertToDiffractionMDWorkspace + + Resulting MD workspace has 805 events and 3 dimensions + .. categories:: diff --git a/Code/Mantid/docs/source/algorithms/ConvertToDiffractionMDWorkspace-v2.rst b/Code/Mantid/docs/source/algorithms/ConvertToDiffractionMDWorkspace-v2.rst index 2929ce54e432f4c3d0708b635a0865b1b7ae7ea1..2efeccd8b00bce417142cfc147b835b207f1f42d 100644 --- a/Code/Mantid/docs/source/algorithms/ConvertToDiffractionMDWorkspace-v2.rst +++ b/Code/Mantid/docs/source/algorithms/ConvertToDiffractionMDWorkspace-v2.rst @@ -86,5 +86,25 @@ Performance Notes million events per second (100-200 million event workspace). - 32-core AMD Opteron 2.7 GHz computer: measured between 8 and 9 million events per second (400-1000 million event workspaces). +Usage + +**Example - Convert re-binned MARI 2D workspace to 3D MD workspace for further analysis/merging with data at different temperatures :** + +.. testcode:: ExConvertToDiffractionMDWorkspace + + # Load Operation + events = CreateSampleWorkspace(OutputWorkspace='events', WorkspaceType='Event', Function='Multiple Peaks', Random=True) + # convert to MD workspace + md = ConvertToDiffractionMDWorkspace(InputWorkspace=events, OutputWorkspace='md', OneEventPerBin=False, LorentzCorrection=True, SplitThreshold=150) + + # A way to look at these results as a text: + print "Resulting MD workspace has {0} events and {1} dimensions".format(md.getNEvents(),md.getNumDims()) + +**Output:** + +.. testoutput:: ExConvertToDiffractionMDWorkspace + + Resulting MD workspace has 805 events and 3 dimensions + .. categories::