Table of Contents
Name | Direction | Type | Default | Description |
---|---|---|---|---|
InputWorkspace | Input | MatrixWorkspace | Mandatory | Input workspace |
OutputWorkspace | Output | MatrixWorkspace | Mandatory | Output workspace |
Algorithm designed to normalise all the spectra in the input workspace so that the value of the resulting workspace has a maximum of 1. This algorithm is designed to run on workspaces where every spectra contains at least one y value greater than 0. This is the case because the data is being normalised to be a maximum of positive 1.
Example - NormaliseSpectra
# Create Workspace
data = '0,1,2,3,4,5'
ws = CreateWorkspace(DataX=data, DataY=data, DataE=data, Nspec=1)
# Execute algorithm
out_ws = NormaliseSpectra(InputWorkspace=ws)
# Print resulting y values
print out_ws.readY(0)
Output:
[ 0. 0.2 0.4 0.6 0.8 1. ]
Categories: Algorithms | Workflow\MIDAS | Inelastic
Python: NormaliseSpectra.py