Table of Contents
Name | Direction | Type | Default | Description |
---|---|---|---|---|
InputWorkspace | Input | IMDHistoWorkspace | Mandatory | An input IMDHistoWorkspace. |
OutputWorkspace | Output | MatrixWorkspace | Mandatory | An output Workspace2D. |
Normalization | Input | string | NoNormalization | Signal normalization method. Allowed values: [‘NoNormalization’, ‘VolumeNormalization’, ‘NumEventsNormalization’] |
FindXAxis | Input | boolean | True | If True, tries to automatically determine the dimension to use as the output x-axis. Applies to line cut MD workspaces. |
Creates a Workspace2D with X,Y, and E copied from an IMDHistoWorkspace. The MD workspace must have at most 2 non-integrated dimensions.
Example 1
ws = 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')
print "%s is a %s" % (ws, ws.id())
wsOut=ConvertMDHistoToMatrixWorkspace(ws)
print "%s is a %s with %i histograms and %i bins" % (wsOut, wsOut.id(), wsOut.getNumberHistograms(), wsOut.blocksize())
Output:
ws is a MDHistoWorkspace
wsOut is a Workspace2D with 3 histograms and 3 bins
Example 2
ws = CreateMDHistoWorkspace(SignalInput='1,2,3',
ErrorInput='1,1,1', Dimensionality='2',
Extents='-1,1,-1,1', NumberOfBins='1,3', Names='A,B', Units='U,T')
print "%s is a %s" % (ws, ws.id())
wsOut=ConvertMDHistoToMatrixWorkspace(ws)
print "%s is a %s with %i histograms and %i bins" % (wsOut, wsOut.id(), wsOut.getNumberHistograms(), wsOut.blocksize())
Output:
ws is a MDHistoWorkspace
wsOut is a Workspace2D with 1 histograms and 3 bins
Categories: Algorithms | Utility\Workspaces | MDAlgorithms\Transforms
C++ source: ConvertMDHistoToMatrixWorkspace.cpp
C++ header: ConvertMDHistoToMatrixWorkspace.h