\(\renewcommand\AA{\unicode{x212B}}\)
Table of Contents
Corrects a group of polarization analysis workspaces for polarizer and analyzer efficiencies.
Name | Direction | Type | Default | Description |
---|---|---|---|---|
InputWorkspaces | Input | str list | Mandatory | A list of workspaces to be corrected corresponding to the flipper configurations. |
OutputWorkspace | Output | WorkspaceGroup | Mandatory | A group of polarization efficiency corrected workspaces. |
Flippers | Input | string | 00, 01, 10, 11 | Flipper configurations of the input workspaces. Allowed values: [‘00, 01, 10, 11’, ‘00, 10, 11’, ‘00, 01, 11’, ‘00, 11’, ‘0, 1’, ‘0’] |
Efficiencies | Input | MatrixWorkspace | Mandatory | A workspace containing the efficiency factors P1, P2, F1 and F2 as histograms |
This algorithm corrects for non-ideal instrument component efficiencies in a polarization analysis experiment by following the procedure and conventions introduced by Wildes [1]. In the full polarization analysis case it solves the corrected count rates \(\Sigma^{++}\), \(\Sigma^{+-}\), \(\Sigma^{-+}\) and \(\Sigma^{--}\) from the equation
where \(I^{jk}\) are the experimental count rates for flipper configuration \(jk\) and \(\bm{M}\) is the four-by-four correction matrix as defined by equations (4) in [1].
InputWorkspaces is a list containing one to four workspace names (X unit: wavelength) corresponding to the instrument configurations given as Flippers. Supported configurations are:
'00, 01, 10, 11'
'00, 01, 11'
and '00, 10, 11'
'00, 11'
'0, 1'
'0'
The algorithm’s output is a group workspace containing the corrected workspaces. The names of each corrected workspace is prefixed by _++
, _+-
, _-+
or _--
depending on which \(\Sigma^{mn}\) they correspond to.
The Efficiencies input property expects to get a workspace with the following properties:
P1
, P2
, F1
, F2
. Other histograms (if present) are ignored.Note
Users at ILL can load a conforming efficiency workspace from disk by LoadILLPolarizationFactors v1.
Note
Errors are calculated as per Wildes [1], except for the numerically solved intensity in '00, 01, 11'
and '00, 10, 11'
flipper configurations in which case the uncertainties of \(\Sigma^{+-}\) or \(\Sigma^{-+}\) are set to zero.
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 - PolarizationEfficiencyCor
LoadILLReflectometry(
Filename='ILL/D17/317370.nxs',
OutputWorkspace='direct_beam',
XUnit='TimeOfFlight')
LoadILLReflectometry(
Filename='ILL/D17/317370.nxs',
OutputWorkspace='reflected_beam',
Measurement='ReflectedBeam',
BraggAngle=0.8,
XUnit='TimeOfFlight')
# Sum pixels containing the reflected intensity
GroupDetectors(
InputWorkspace='reflected_beam',
OutputWorkspace='reflected_beam',
WorkspaceIndexList=[199, 200, 201, 202, 203, 204, 205])
ConvertUnits(
InputWorkspace='reflected_beam',
OutputWorkspace='reflected_beam',
Target='Wavelength',
EMode='Elastic')
# There are some unphysical wavelengths
CropWorkspace(
InputWorkspace='reflected_beam',
OutputWorkspace='reflected_beam',
XMin=0.)
# Fake two flipper configurations
RenameWorkspace(
InputWorkspace='reflected_beam',
OutputWorkspace='up'
)
CloneWorkspace(
InputWorkspace='up',
OutputWorkspace='down'
)
Scale(
InputWorkspace='down',
OutputWorkspace='down',
Factor=0.1
)
LoadILLPolarizationFactors(
Filename='ILL/D17/PolarizationFactors.txt',
OutputWorkspace='efficiencies',
WavelengthReference='up')
PolarizationEfficiencyCor(
InputWorkspaces='up, down',
OutputWorkspace='corrected',
Efficiencies='efficiencies',
Flippers='00, 11')
orig = mtd['up']
corr = mtd['corrected_++']
index = orig.yIndexOfX(15.)
ratio_up = corr.readY(0)[index] / orig.readY(0)[index]
print("Ratio of corrected and original 'up' intensity at 15A: {:.4}".format(ratio_up))
orig = mtd['down']
corr = mtd['corrected_--']
index = orig.yIndexOfX(15.)
ratio_down = corr.readY(0)[index] / orig.readY(0)[index]
print("Ratio of corrected and original 'down' intensity at 15A: {:.4}".format(ratio_down))
Output:
Ratio of corrected and original 'up' intensity at 15A: 1.038
Ratio of corrected and original 'down' intensity at 15A: 1.062
[1] | (1, 2, 3, 4) A. R. Wildes, Neutron News, 17 17 (2006) doi: 10.1080/10448630600668738 |
Categories: AlgorithmIndex | Reflectometry
C++ header: PolarizationCorrectionWildes.h (last modified: 2020-06-23)
C++ source: PolarizationCorrectionWildes.cpp (last modified: 2020-06-23)