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

AnvredCorrection v1

../_images/AnvredCorrection-v1_dlg.png

AnvredCorrection dialog.

Summary

Calculates anvred correction factors for attenuation due to absorption and scattering in a spherical sample

See Also

LorentzCorrection

Properties

Name

Direction

Type

Default

Description

InputWorkspace

Input

MatrixWorkspace

Mandatory

The X values for the input workspace must be in units of wavelength or TOF

OutputWorkspace

Output

MatrixWorkspace

Mandatory

Output workspace name

LinearScatteringCoef

Input

number

Optional

Linear scattering coefficient in 1/cm. If not provided this will be calculated from the material cross-section if present (set with SetSampleMaterial)

LinearAbsorptionCoef

Input

number

Optional

Linear absorption coefficient at 1.8 Angstroms in 1/cm. If not provided this will be calculated from the material cross-section if present (set with SetSampleMaterial)

Radius

Input

number

Optional

Radius of the sample in centimeters. f not provided the radius will be taken from the sample shape if it is a sphere (set with SetSample).

PreserveEvents

Input

boolean

True

Keep the output workspace as an EventWorkspace, if the input has events (default). If false, then the workspace gets converted to a Workspace2D histogram.

OnlySphericalAbsorption

Input

boolean

False

All corrections done if false (default). If true, only the spherical absorption correction.

ReturnTransmissionOnly

Input

boolean

False

Corrections applied to data if false (default). If true, only return the transmission coefficient.

PowerLambda

Input

number

4

Power of lamda

DetectorBankScaleFactors

Input

boolean

False

No scale factors if false (default). If true, use scale factors from instrument parameter map.

Description

Following A.J.Schultz’s anvred, the weight factors should be:

\(\text{sin}^2(theta) / (lambda^4 * spec * eff * trans)\)

where

  • theta = scattering_angle/2

  • lamda = wavelength (in angstroms?)

  • spec = incident spectrum correction

  • eff = pixel efficiency

  • trans = absorption correction

The quantity: \(\text{sin}^2(theta) / eff\) depends only on the pixel and can be pre-calculated for each pixel. It could be saved in array pix_weight[].

For now, pix_weight[] is calculated by the method BuildPixWeights() and just holds the \(\text{sin}^2(theta)\) values. The wavelength dependent portion of the correction is saved in the array lamda_weight[].

The time-of-flight is converted to wave length by multiplying by tof_to_lamda[id], then (int)STEPS_PER_ANGSTROM * lamda gives an index into the table lamda_weight[]. The lamda_weight[] array contains values like: 1/(lamda^power * spec(lamda)) which are pre-calculated for each lamda. These values are saved in the array lamda_weight[]. The optimal value to use for the power should be determined when a good incident spectrum has been determined. Currently, power=3 when used with an incident spectrum and power=2.4 when used without an incident spectrum.

The pixel efficiency and incident spectrum correction are NOT CURRENTLY USED. The absorption correction, trans, depends on both lamda and the pixel, Which is a fairly expensive calculation when done for each event. The transmission is calculated for a spherical sample using the fits to the tabulated values of \(A^* = 1/\text{transmission}\) in [1] using the functional form set out in [2].

Also see LorentzCorrection v1

Usage

Example:

ws = CreateSampleWorkspace("Event",XMin=5000)
wsOut = AnvredCorrection(ws,LinearScatteringCoef=1.302,
    LinearAbsorptionCoef=1.686,Radius=0.170,PowerLambda=3)

References

Categories: AlgorithmIndex | Crystal\Corrections | CorrectionFunctions\AbsorptionCorrections

Source

C++ header: AnvredCorrection.h

C++ source: AnvredCorrection.cpp