\(\renewcommand\AA{\unicode{x212B}}\)
AverageLogData v1¶
Summary¶
Computes the proton charge averaged value of a given log.
Properties¶
Name 
Direction 
Type 
Default 
Description 

InputWorkspace 
Input 
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 
Description¶
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.
Usage¶
Note
To run these usage examples please first download the usage data, and add these to your path. In Mantid 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: AlgorithmIndex  DataHandling\Logs
Source¶
C++ header: AverageLogData.h
C++ source: AverageLogData.cpp