MayersSampleCorrection v1

../_images/MayersSampleCorrection-v1_dlg.png

MayersSampleCorrection dialog.

Summary

Corrects the input data for the effects of attenuation & multiple scattering

Properties

Name Direction Type Default Description
InputWorkspace Input MatrixWorkspace Mandatory Input workspace with X units in TOF. The workspace must also have a sample with a cylindrical shape and an instrument with a defined source and sample position.
MultipleScattering Input boolean False If True then also correct for the effects of multiple scattering.Please note that the MS correction assumes the scattering is elastic.
OutputWorkspace Output MatrixWorkspace Mandatory An output workspace.

Description

Calculates and applies corrections due to the effects of absorption, and optionally multiple scattering, to the signal and error values for a given workspace. The full background to the algorithm is described by Lindley et al. [1] and is briefly described here.

The aim is to correct the number of neutrons detected at a given detector (N_d) to compute the number of incident neutrons (N_0):

N_d = \frac{N_0 nV}{A_s} \frac{\sigma_s}{4\pi} \frac{\eta\Delta\Omega}{1-\beta}

where n is the sample number density, V is the sample volume, A_s is the self-shielding factor, \sigma_s is the scattering cross section, \eta is the detector efficiency, \Delta\Omega is the solid angle and \beta is the ratio of twice to once scattered intensity.

The following assumptions are made:

  • the sample shape is a cylinder

  • for multiple scattering:
    • the scattering is assumed to be elastic and isotropic
    • the ratio of successive orders of scattering are equal.

The input time of flight range combined with the cylinder radius (r) and scattering cross-sections gives a range of \mu r for the cylinder, where \mu is the inverse attenutation length. The \mu r range is divided in to a discrete number of points for each point:

  • the attentuation factor is computed by numerical integration over the sample cylinder
  • the multiple scattering factor (if requested) is computed by simulating over a fixed number of second order scattering events and computing the ratio of second order and first order scattering.

A weighted least-squares fit is applied to both the set of attenuation and multiple scattering factors to allow interpolation of the correction factor from any time-of-flight value in the input range. For each time-of-flight value the factor is computed from the fit coefficients and the correction applied multiplicatively:

\begin{aligned}
y_{out} &= y_{in} * corrfact \\
e_{out} &= y_{out} * e_{in} / y_{in}
\end{aligned}

The above procedure is repeated separately for each spectrum in the workspace.

Usage

Example - Correct Vanadium For Both Absorption & Multiple Scattering

# Define function to create sample shape
def cylinder_sample(workspace, radius, height):
    radius_m = radius/100.
    height_m = height/100.
    xml = '<cylinder id="sample">' \
               '<centre-of-bottom-base x="0.0" y="{0}" z="0.0" />' \
                '<axis x="0.0" y="1.0" z="0" />' \
                '<radius val="{1}" />' \
                '<height val="{2}" />'\
                '</cylinder>'.format(0.5*height_m, radius_m, height_m)
    CreateSampleShape(InputWorkspace=workspace, ShapeXML=xml)
#enddef

# Create a fake workspace with TOF data
sample_ws = CreateSampleWorkspace(Function='Powder Diffraction',
                                  NumBanks=1,BankPixelWidth=1,XUnit='TOF',
                                  XMin=1000,XMax=10000)

cyl_height_cm = 4
cyl_radius_cm = 0.25
cylinder_sample(sample_ws, cyl_radius_cm, cyl_height_cm)

# Vanadium material
material = 'V'
num_density = 0.07261
SetSampleMaterial(sample_ws, ChemicalFormula=material,
                  SampleNumberDensity=num_density)

# Run corrections
corrected_sample = MayersSampleCorrection(sample_ws,
                                          MultipleScattering=True)

# Print a bin
print "Uncorrected signal: {0:.4f}".format(sample_ws.readY(0)[25])
print "Corrected signal: {0:.4f}".format(corrected_sample.readY(0)[25])

Output:

Uncorrected signal: 0.0556
Corrected signal: 0.0120

References

[1]Lindley, E.J., & Mayers, J. Cywinski, R. (Ed.). (1988). Experimental method and corrections to data. United Kingdom: Adam Hilger. - https://inis.iaea.org/search/search.aspx?orig_q=RN:20000574

Categories: Algorithms | CorrectionFunctions\AbsorptionCorrections