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). |
Take a MatrixWorkspace as input, and replaces the Y values by Y/E (signal divided by error)
Example: Taking the derivative of logs
ws = CreateSampleWorkspace("Event")
wsOut = SignalOverError(ws)
print "Values from every 10th bin"
print "bin\tY\tE\tY_New"
for i in range (0,ws.blocksize(),10):
print "%i\t%.2f\t%.2f\t%.2f" % (i,ws.readY(0)[i],ws.readE(0)[i],wsOut.readY(0)[i])
Output:
Values from every 10th bin
bin Y E Y_New
0 30.00 5.48 5.48
10 30.00 5.48 5.48
20 30.00 5.48 5.48
30 30.00 5.48 5.48
40 30.00 5.48 5.48
50 1030.00 32.09 32.09
60 30.00 5.48 5.48
70 30.00 5.48 5.48
80 30.00 5.48 5.48
90 30.00 5.48 5.48
Categories: Algorithms | Arithmetic