Table of Contents
This algorithm normalises the counts by the monitor counts with additional efficiency correction according to the formula set in the instrument parameters file.
Name | Direction | Type | Default | Description |
---|---|---|---|---|
InputWorkspace | Input | MatrixWorkspace | Mandatory | The workspace to correct for monitor efficiency |
OutputWorkspace | Output | MatrixWorkspace | Mandatory | The name of the workspace in which to store the result. |
This algorithm normalises the neutron counts by monitor counts with an additional efficiency correction.
The monitor counts is the total count and it is stored in the SampleLogs of the input workspace.
This count is corrected taking into account the monitor efficiency. The formula used for the correction is stored in the Parameters file and requires the incident energy (), which is stored in the SampleLogs of the input workspace.
The corrected value of the monitor counts is used to normalise the input workspace.
Example
import numpy as np
wsSample = LoadMLZ(Filename='TOFTOFTestdata.nxs')
wsNorm = MonitorEfficiencyCorUser(wsSample )
# Input and output workspaces have the same structure
print('Number of histograms of the input and output workspaces:')
print('{} {}'.format(wsSample.getNumberHistograms(), wsNorm.getNumberHistograms()))
print('Number of time channels of the input an output workspaces:')
print('{} {}'.format( wsSample.blocksize(), wsNorm.blocksize()))
# Check calculation of normalisation coefficient between input and output workspaces
wsCheck = Divide(wsSample,wsNorm)
print("Coefficient of proportionality between Input and Output of MonitorEfficiencyCorUser algorithm: {:.3f}".format(wsCheck.readY(102)[1]))
# Read the values of the incident energy and of the monitor counts from the SampleLogs of wsSample
monitor_counts = float(mtd['wsSample'].getRun().getLogData('monitor_counts').value)
Ei = float(mtd['wsSample'].getRun().getLogData('Ei').value)
print("Coefficient from theoretical formula = monitor_counts * sqrt(Ei/25.3): {:.3f}".format(monitor_counts*np.sqrt(Ei/25.3)))
Output:
Number of histograms of the input and output workspaces:
1006 1006
Number of time channels of the input an output workspaces:
1024 1024
Coefficient of proportionality between Input and Output of MonitorEfficiencyCorUser algorithm: 41038.432
Coefficient from theoretical formula = monitor_counts * sqrt(Ei/25.3): 41038.432
Categories: AlgorithmIndex | CorrectionFunctions\NormalisationCorrections
C++ source: MonitorEfficiencyCorUser.cpp (last modified: 2019-07-17)
C++ header: MonitorEfficiencyCorUser.h (last modified: 2018-10-05)