diff --git a/Code/Mantid/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/CutMD.py b/Code/Mantid/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/CutMD.py index db43fa742e1a..a78bba9dac88 100644 --- a/Code/Mantid/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/CutMD.py +++ b/Code/Mantid/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/CutMD.py @@ -196,7 +196,6 @@ def __verify_input_workspace(self, to_cut): def __verify_projection_input(self, projection_table): if isinstance(projection_table, ITableWorkspace): column_names = set(projection_table.getColumnNames()) - logger.warning(str(column_names)) if not column_names == set([Projection.u, Projection.v, 'type']): if not column_names == set([Projection.u, Projection.v, 'offsets', 'type']): if not column_names == set([Projection.u, Projection.v, Projection.w, 'offsets', 'type']): diff --git a/Code/Mantid/docs/source/algorithms/CutMD-v1.rst b/Code/Mantid/docs/source/algorithms/CutMD-v1.rst new file mode 100644 index 000000000000..fa17ef3ee505 --- /dev/null +++ b/Code/Mantid/docs/source/algorithms/CutMD-v1.rst @@ -0,0 +1,68 @@ +.. algorithm:: + +.. summary:: + +.. alias:: + +.. properties:: + +Description +----------- + +This algorithm performs slicing of multiDimensional data according to a chosen projection, and binning choice. The algorithm uses :ref:`algm-BinMD` or +:ref:`algm-SliceMD` to achieve the binning of the data. The choice of child algorithm used for the slicing is controlled by the NoPix option. + +The synax is similar to that used by `Horace `__. + +Usage +----- + +**Example - Contrived example using projections:** + +.. testcode:: Example4D + + to_cut = CreateMDWorkspace(Dimensions=4, Extents=[-1,1,-1,1,-1,1,-10,10], Names="H,K,L,E", Units="U,U,U,V") + # Add two fake peaks so that we can see the effect of the basis transformation + + FakeMDEventData(InputWorkspace='to_cut', PeakParams=[10000,-0.5,0,0,0,0.1]) + + FakeMDEventData(InputWorkspace='to_cut', PeakParams=[10000,0.5,0,0,0,0.1]) + + + SetUB(Workspace=to_cut, a=1, b=1, c=1, alpha=90, beta=90, gamma=90) + SetSpecialCoordinates(InputWorkspace=to_cut, SpecialCoordinates='HKL') + projection = CreateEmptyTableWorkspace() + # Correct number of columns, and names + + projection.addColumn("double", "u") + projection.addColumn("double", "v") + + projection.addColumn("double", "w") + projection.addColumn("double", "offsets") + + projection.addColumn("str", "type") + + projection.addRow([1,-1, 0, 0, "r"]) + + projection.addRow([1, 1, 0, 0, "r"]) + projection.addRow([0, 0, 1, 0, "r"]) + + # Apply the cut + + out_md = CutMD(to_cut, Projection=projection, P1Bin=[0.1], P2Bin=[0.1], P3Bin=[0.1], P4Bin=[-5,5], NoPix=True) + print 'number of dimensions', out_md.getNumDims() + print 'number of dimensions not integrated', len(out_md.getNonIntegratedDimensions()) + dim_dE = out_md.getDimension(3) + print 'min dE', dim_dE.getMaximum() + print 'max dE', dim_dE.getMinimum() + +Output: + +.. testoutput:: Example4D + + number of dimensions 4 + number of dimensions not integrated 3 + min dE 5.0 + max dE -5.0 + +.. categories::