MonitorEfficiencyCorUser v1

../_images/MonitorEfficiencyCorUser-v1_dlg.png

MonitorEfficiencyCorUser dialog.

Summary

This algorithm normalises the counts by the monitor counts with additional efficiency correction according to the formula set in the instrument parameters file.

Properties

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.

Description

This algorithm normalises the neutron counts by monitor counts with an additional efficiency correction.

To date this algorithm only supports the TOFTOF instrument.

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 (Ei), which is stored in the SampleLogs of the input workspace.

The corrected value of the monitor counts is used to normalise the input workspace.

Restrictions

A formula named “formula_eff” must be defined in the instrument parameters file. It is defined as “monitor counts * sqrt(Ei/25.3)”

The incident energy Ei and the monitor counts are read in the SampleLogs of the input workspace.

Usage

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 wsSample.getNumberHistograms(), wsNorm.getNumberHistograms()
print 'Number of time channels of the input an output workspaces:'
print 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: %5.3f" % 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): %5.3f" % (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: Algorithms | CorrectionFunctions\NormalisationCorrections