Table of Contents
Calculates anvred correction factors for attenuation due to absorption and scattering in a spherical sample
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 set with SetSampleMaterial |
LinearAbsorptionCoef | Input | number | Optional | Linear absorption coefficient at 1.8 Angstroms in 1/cm if not set with SetSampleMaterial |
Radius | Input | number | Optional | Radius of the sample in centimeters |
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. |
Following A.J.Schultz’s anvred, the weight factors should be:
where
The quantity: 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 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.
Also see LorentzCorrection v1
Example:
ws = CreateSampleWorkspace("Event",XMin=5000)
wsOut = AnvredCorrection(ws,LinearScatteringCoef=1.302,
LinearAbsorptionCoef=1.686,Radius=0.170,PowerLambda=3)
Categories: AlgorithmIndex | Crystal\Corrections | CorrectionFunctions\AbsorptionCorrections
C++ source: AnvredCorrection.cpp (last modified: 2019-08-22)
C++ header: AnvredCorrection.h (last modified: 2018-10-05)