\(\renewcommand\AA{\unicode{x212B}}\)
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("{} is a {}".format(ws, ws.id()))
wsOut=ConvertMDHistoToMatrixWorkspace(ws)
print("{} is a {} with {} histograms and {} bins".format(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("{} is a {}".format(ws, ws.id()))
wsOut=ConvertMDHistoToMatrixWorkspace(ws)
print("{} is a {} with {} histograms and {} bins".format(wsOut, wsOut.id(), wsOut.getNumberHistograms(), wsOut.blocksize()))
Output:
ws is a MDHistoWorkspace
wsOut is a Workspace2D with 1 histograms and 3 bins
Categories: AlgorithmIndex | Utility\Workspaces | MDAlgorithms\Transforms
C++ header: ConvertMDHistoToMatrixWorkspace.h (last modified: 2020-03-20)
C++ source: ConvertMDHistoToMatrixWorkspace.cpp (last modified: 2020-04-07)