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

OneMinusExponentialCor v1

../_images/ImageNotFound.png

Enable screenshots using DOCS_SCREENSHOTS in CMake

Summary

Corrects the data in a workspace by one minus the value of an exponential function.

See Also

MagFormFactorCorrection, ExponentialCorrection, PowerLawCorrection

Properties

Name

Direction

Type

Default

Description

InputWorkspace

Input

MatrixWorkspace

Mandatory

The name of the input workspace

OutputWorkspace

Output

MatrixWorkspace

Mandatory

The name to use for the output workspace (can be the same as the input one).

C

Input

number

1

The positive value by which the entire exponent calculation is multiplied (see formula below).

C1

Input

number

1

The value by which the entire calculation is multiplied (see formula below).

Operation

Input

string

Divide

Whether to divide (the default) or multiply the data by the correction function. Allowed values: [‘Multiply’, ‘Divide’]

Description

This algorithm corrects the data and error values on a workspace by the value of one minus an exponential function of the form \(\rm C1(1 - e^{-{\rm C} x})\). This formula is calculated for each data point, with the value of x being the mid-point of the bin in the case of histogram data. The data and error values are either divided or multiplied by the value of this function, according to the setting of the Operation property.

This algorithm is now event aware.

This correction is applied to a copy of the input workpace and put into output workspace. If the input and output workspaces have the same name, the operation is applied to the workspace of that name.

Usage

Example:

ws=CreateWorkspace([1,2,3],[1,1,1])
print("You can divide the data by the factor")
wsOut=OneMinusExponentialCor(ws,2,3,"Divide")
print(wsOut.readY(0))

print("Or multiply")
wsOut=OneMinusExponentialCor(ws,2,3,"Multiply")
print(wsOut.readY(0))

Output:

You can divide the data by the factor
[ 0.38550588  0.33955245  0.33416164]
Or multiply
[ 2.59399415  2.94505308  2.99256374]

Categories: AlgorithmIndex | CorrectionFunctions

Source

C++ header: OneMinusExponentialCor.h

C++ source: OneMinusExponentialCor.cpp