\(\renewcommand\AA{\unicode{x212B}}\)

PolarizationCorrectionWildes v1

../_images/PolarizationCorrectionWildes-v1_dlg.png

PolarizationCorrectionWildes dialog.

Summary

Corrects a group of polarization analysis workspaces for polarizer and analyzer efficiencies.

Properties

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

Description

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

\[\begin{split}\begin{bmatrix} \Sigma^{++} \\ \Sigma^{+-} \\ \Sigma^{-+} \\ \Sigma^{--} \end{bmatrix} = \bm{M} \begin{bmatrix} I^{00} \\ I^{01} \\ I^{10} \\ I^{11} \end{bmatrix},\end{split}\]

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].

Flipper configurations

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'

Full polarization corrections. Four input workspaces are required. They should be in the input group in the following order: both flippers off, analyzer flipper on, polarizer flipper on, both flippers on.

'00, 01, 11' and '00, 10, 11'

Polarization corrections with the assumption that the corrected count rates \(\Sigma^{+-} = \Sigma^{-+}\). In this case the intensity of the missing flipper configuration (01 or 10) can be solved from the other intensities. Workspaces in the input group should be in the following order: both flippers off, one flipper on, both flippers on.

'00, 11'

Polarization corrections with the assumption that the corrected count rates \(\Sigma^{+-} = \Sigma^{-+} = 0\). In this case the intensities of the missing flipper configurations (01 and 10) can be solved from the other intensities. Workspaces in the input group should be in the following order: both flippers off, both flippers on.

'0, 1'

Polarization corrections when no analyzer has been used. Workspaces in the input group should be in the following order: polarizer flipper off, polarizer flipper on.

'0'

Polarization corrections for a direct beam measurement in a reflectometry experiment.

Output

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.

Efficiency factors

The Efficiencies input property expects to get a workspace with the following properties:

  • Contains four histograms, each labeled by their vertical axis as P1, P2, F1, F2. Other histograms (if present) are ignored.

  • The Y values of each histogram should be the corresponding efficiencies as functions of wavelength as defined in [1].

  • The wavelength values (X values) should be the same is in the input workspaces.

Note

Users at ILL can load a conforming efficiency workspace from disk by LoadILLPolarizationFactors v1.

Error propagation

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.

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 - 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

References

Categories: AlgorithmIndex | Reflectometry

Source

C++ header: PolarizationCorrectionWildes.h

C++ source: PolarizationCorrectionWildes.cpp