\(\renewcommand\AA{\unicode{x212B}}\)

MinusMD v1

../_images/ImageNotFound.png

Enable screenshots using DOCS_SCREENSHOTS in CMake

Summary

Subtract two MDWorkspaces.

See Also

PlusMD, MultiplyMD, DivideMD, PowerMD

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: AlgorithmIndex | MDAlgorithms\MDArithmetic

Source

C++ header: MinusMD.h

C++ source: MinusMD.cpp