ComputeCalibrationCoefVan v1¶
Summary¶
Calculate coefficients for detector efficiency correction using the Vanadium data.
Properties¶
Name |
Direction |
Type |
Default |
Description |
---|---|---|---|---|
VanadiumWorkspace |
Input |
Mandatory |
Input Vanadium workspace |
|
EPPTable |
Input |
Mandatory |
Input EPP table. May be produced by FindEPP algorithm. |
|
OutputWorkspace |
Output |
Mandatory |
Name the workspace that will contain the calibration coefficients |
|
Temperature |
Input |
number |
Optional |
Temperature during the experiment (in Kelvins) if temperature is not given in the sample logs or needs to be overriden. |
EnableDWF |
Input |
boolean |
True |
Enable or disable the Debye-Waller correction. |
Description¶
Algorithm creates a workspace with detector sensitivity correction coefficients using the given Vanadium workspace. The correction coefficients are calculated as follows.
Load the peak centre and sigma from the EPPTable. These values are used to calculate sum
aswhere
is the peak centre position and is the corresponding to value for i-th detector.(If EnableDWF is true) Calculate the Debye-Waller factor according to [1]:
where
if , otherwisewhere
is the ratio of the temperature during the experiment to the Debye temperature , is the Vanadium atomic mass (in kg) and is the polar angle of the i-th detector. By default, the temperature is read from the sample logs. The log entry can be given as the ‘temperature_sample_log’ in the IPF, otherwise ‘temperature’ entry is used. If the log is missing, or incorrect, the Temperature input property can be used instead.
Warning
If no temperature is available, or is set to an invalid value,
(If EnableDWF is true) Finally, the correction coefficients
are calculated as
Workspace containing these correction coefficients is created as an output and can be used as a RHS workspace in Divide v1 to apply correction to the LHS workspace.
Restrictions on the input workspaces¶
The valid input workspace:
must have an instrument set
must have a wavelength sample log
Restrictions for EPPTable:
number of rows of the table must match to the number of histograms of the input workspace.
table must have the PeakCentre and Sigma columns.
Note
The input EPPTable can be produced using the FindEPP v2 algorithm.
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.
Example
# load Vanadium data
wsVana = LoadMLZ(Filename='TOFTOFTestdata.nxs')
# find elastic peak positions
epptable = FindEPP(wsVana)
# calculate correction coefficients
wsCoefs = ComputeCalibrationCoefVan(wsVana, epptable)
print(f'Spectrum 4 of the output workspace is filled with: {wsCoefs.readY(999)[0]:.1f}')
# wsCoefs can be used as rhs with Divide algorithm to apply correction to the data
wsCorr = wsVana/wsCoefs
print(f'Spectrum 4 of the input workspace is filled with: {wsVana.readY(999)[0]:.1f}')
print(f'Spectrum 4 of the corrected workspace is filled with: {wsCorr.readY(999)[0]:.5f}')
Output:
Spectrum 4 of the output workspace is filled with: 6894.8
Spectrum 4 of the input workspace is filled with: 1.0
Spectrum 4 of the corrected workspace is filled with: 0.00015
References¶
Categories: AlgorithmIndex | CorrectionFunctions\EfficiencyCorrections
Source¶
Python: ComputeCalibrationCoefVan.py