The MD Histogram Workspace[MDHistoWorkspace] is a simple multi-dimensional workspace. In contrast to the MDWorkspace, which contains points in space, the MDHistoWorkspace consists of a signal and error spread around space on a regular grid.
In a way, the MDHistoWorkspace is to a MDWorkspace is what the Workspace2D is to the EventWorkspace.
MDHistoWorkspaces typically have 3 or 4 dimensions, although they can be created in up to 9 dimensions.
The following algorithms allow you to perform simple arithmetic on the values:
These arithmetic operations propagate errors as described here. The formulas used are described in each algorithm’s wiki page.
The basic arithmetic operators are available from python. For example:
Compound arithmetic expressions can be made, e.g:
E = (A - B) / (C - D)
The MDHistoWorkspace can be treated as a boolean workspace. In this case, 0.0 is “false” and 1.0 is “true”.
The following operations can create a boolean MDHistoWorkspace:
These operations can combine/modify boolean MDHistoWorkspaces:
These boolean operators are available from python. Make sure you use the bitwise operators: & | ^ ~ , not the “word” operators (and, or, not). For example:
The SetMDUsingMask algorithm allows you to modify the values in a MDHistoWorkspace using a mask created using the boolean operations above. See the algorithm wiki page for more details.
Category: Concepts