Table of Contents
Name | Direction | Type | Default | Description |
---|---|---|---|---|
InputWorkspace | Input | MatrixWorkspace | Mandatory | An input workspace that contains a Sample log property, and a proton charge property. |
LogName | Input | string | Name of the log to be averaged | |
FixZero | Input | boolean | True | If true, the proton charge and the log value time series are assumed to start at the same moment. |
Average | Output | number | ||
Error | Output | number |
The algorithm will calculate a proton_charge weighted average and standard deviation of any log value of numeric series type. All proton charges earlier than the first data are ignored. Any proton pulse is counted for the log value on the right. This means that if all proton pulses happen before the first value, and FixZero is false, the average and standard deviations are NANs. If all the proton pulses occur after the last value, and FixZero is false, the average is equal to the last value, and the standard deviation is zero.
Note
To run these usage examples please first download the usage data, and add these to your path. In MantidPlot this is done using Manage User Directories.
#load a workspace with logs
ws=Load("CNCS_7860")
#apply algorithm
value,error=AverageLogData(ws,LogName="ChopperStatus5")
#print the values
print "ChopperStatus5 : %1.3f +/- %1.3f"%(value,error)
Output:
ChopperStatus5 : 3.942 +/- 0.309
Categories: Algorithms | DataHandling | Logs