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

SetUncertainties v1

../_images/ImageNotFound.png

Enable screenshots using DOCS_SCREENSHOTS in CMake

Summary

This algorithm creates a workspace which is the duplicate of the input, but where the error value for every bin has been set to zero.

Properties

Name

Direction

Type

Default

Description

InputWorkspace

Input

MatrixWorkspace

Mandatory

OutputWorkspace

Output

MatrixWorkspace

Mandatory

SetError

Input

string

zero

How to reset the uncertainties. Allowed values: [‘zero’, ‘sqrt’, ‘sqrtOrOne’, ‘oneIfZero’, ‘custom’]

SetErrorTo

Input

number

1

The error value to set when using custom mode

IfEqualTo

Input

number

0

Which error values in the input workspace should be replaced when using custom mode

Precision

Input

number

3

How many decimal places of IfEqualTo are taken into account for matching when using custom mode

Description

The uncertainties for the entire workspace will be recalculated according to the SetError property.

  • SetError="zero" will change all of the uncertainties to zero

  • SetError="sqrt" will recalculate all of the uncertainties to be the square root of the y value

  • SetError="oneIfZero" will change the uncertainties to one if they are currently zero

  • SetError="sqrtOrOne" will recalculate all of the uncertainties to be the square root of the y value. If the uncertainty is zero it will be set to one.

  • SetError="custom" will recalculate the uncertainties so that each error value matching the IfEqualTo parameter is replaced with the value in the SetErrorTo parameter. Additionally, the Precision parameter lets the user specify how many decimal places of the value in IfEqualTo need to be matched to be replaced. For example, SetErrorTo = 1, IfEqualTo = 0.025 and Precision = 3 would truncate 0.025123, 0.02599999 etc. to 0.025 and then convert those error values to 1 (but not, for example 0.02499 or 0.026).

The result is a Workspace2D (mantid.api.MatrixWorkspace).

Categories: AlgorithmIndex | Arithmetic\Errors

Source

C++ header: SetUncertainties.h

C++ source: SetUncertainties.cpp