Exponential v1

../_images/Exponential-v1_dlg.png

Exponential dialog.

Summary

The Exponential algorithm will transform the signal values ‘y’ into e^y.

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).

Description

The algorithm will apply the exponential function (i.e. e^y) to the data from a workspaces. The corresponding error values will be updated using E_{new}=E_{old}e^y, assuming errors are Gaussian and small compared to the signal. The units of the workspace are not updated, so the user must take care in the use of such output workspaces. When acting on an event workspace, the output will be a Workspace2D, with the default binning from the original workspace.

Usage

import numpy as np

# Create a workspace
ws = CreateSampleWorkspace()

# Apply the natural exponential function to the data in the workspace
res = Exponential( ws )

# Check the result
y = ws.readY(0)
yres = res.readY(0)

# Use numpy array calculation to apply an exponential to all elements of array y
yexp = np.exp(y)
# Use numpy to check that all elements in two arrays are equal
print(np.all( yexp == yres ))

Output

True

Categories: Algorithms | Arithmetic

Source

C++ source: Exponential.cpp (last modified: 2016-05-18)

C++ header: Exponential.h (last modified: 2016-06-07)