Table of Contents
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). |
The algorithm will apply the exponential function (i.e. ) to the data from a workspaces. The corresponding error values will be updated using , 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.
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 ))
C++ source: Exponential.cpp (last modified: 2016-05-18)
C++ header: Exponential.h (last modified: 2016-06-07)