MinusMD v1

../_images/MinusMD-v1_dlg.png

MinusMD dialog.

Summary

Subtract two MDWorkspaces.

Properties

Name Direction Type Default Description
LHSWorkspace Input IMDWorkspace Mandatory An MDEventWorkspace, MDHistoWorkspace or WorkspaceSingleValue as the left-hand side of the operation.
RHSWorkspace Input IMDWorkspace Mandatory An MDEventWorkspace, MDHistoWorkspace or WorkspaceSingleValue as the right-hand side of the operation.
OutputWorkspace Output IMDWorkspace Mandatory Name of the output MDEventWorkspace or MDHistoWorkspace.

Description

Subtract two MDHistoWorkspace‘s or a MDHistoWorkspace and a scalar.

  • MDHistoWorkspace - MDHistoWorkspace
    • The operation is performed element-by-element.
  • ‘’‘MDHistoWorkspace - Scalar ‘’‘
    • The scalar is subtracted from every element of the MDHistoWorkspace. The squares of errors are summed.
  • Scalar - MDHistoWorkspace
    • This is not allowed.
  • :ref:`MDEventWorkspace <MDWorkspace>` - :ref:`MDEventWorkspace <MDWorkspace>`
    • The signal of each event on the right-hand-side is multiplied by -1 before the events are summed.
    • The number of events in the output MDEventWorkspace is that of the LHS and RHS workspaces put together.
  • :ref:`MDEventWorkspace <MDWorkspace>` - Scalar or MDHistoWorkspace
    • This is not possible.

Categories: Algorithm Index | MDAlgorithms\MDArithmetic

Source

C++ source: MinusMD.cpp (last modified: 2018-10-05)

C++ header: MinusMD.h (last modified: 2018-10-05)