Table of Contents
Name | Direction | Type | Default | Description |
---|---|---|---|---|
SampleWorkspace | Input | MatrixWorkspace | Mandatory | Sample workspace. |
SampleChemicalFormula | Input | string | Mandatory | Sample chemical formula |
SampleDensityType | Input | string | Mass Density | Use of Mass density or Number density. Allowed values: [‘Mass Density’, ‘Number Density’] |
SampleDensity | Input | number | 0.1 | Mass density (g/cm^3) or Number density (atoms/Angstrom^3) |
SampleInnerRadius | Input | number | 0.2 | Sample radius |
SampleOuterRadius | Input | number | 0.25 | Sample radius |
CanWorkspace | Input | MatrixWorkspace | Container workspace. | |
UseCanCorrections | Input | boolean | False | Use can corrections in subtraction |
CanChemicalFormula | Input | string | Chemical formula for the can | |
CanDensityType | Input | string | Mass Density | Use of Mass density or Number density. Allowed values: [‘Mass Density’, ‘Number Density’] |
CanDensity | Input | number | 0.1 | Mass density (g/cm^3) or Number density (atoms/Angstrom^3) |
CanInnerRadius | Input | number | 0.19 | Sample radius |
CanOuterRadius | Input | number | 0.26 | Sample radius |
CanScaleFactor | Input | number | 1 | Scale factor to multiply can data |
Events | Input | number | 5000 | Number of neutron events |
OutputWorkspace | Output | MatrixWorkspace | Mandatory | The output corrected workspace. |
CorrectionsWorkspace | Output | WorkspaceGroup | The corrections workspace for scattering and absorptions in sample. |
Calculates and applies corrections for scattering abs absorption in a annular sample for a run on an indirect inelastic instrument, optionally allowing for the subtraction or corrections of the container.
The correction factor workspace is a workspace group containing the correction factors in the Paalman and Pings format, note that only and factors are calculated by this algorithm.
Note
To run these usage examples please first download the usage data, and add these to your path. In MantidPlot this is done using Manage User Directories.
Example - Sample corrections for IRIS:
red_ws = LoadNexusProcessed(Filename='irs26176_graphite002_red.nxs')
can_ws = LoadNexusProcessed(Filename='irs26173_graphite002_red.nxs')
corrected, fact = IndirectAnnulusAbsorption(SampleWorkspace=red_ws,
SampleChemicalFormula='H2-O',
CanWorkspace=can_ws,
CanScaleFactor=0.8,
CanInnerRadius=0.19,
SampleInnerRadius=0.2,
SampleOuterRadius=0.25,
CanOuterRadius=0.26,
Events=200,
Version=1)
ass = fact[0]
print ('Corrected workspace is intensity against %s'
% (corrected.getAxis(0).getUnit().caption()))
print ('Ass workspace is %s against %s'
% (ass.YUnitLabel(), ass.getAxis(0).getUnit().caption()))
Output:
Corrected workspace is intensity against Energy transfer
Ass workspace is Attenuation factor against Wavelength
Example - Sample corrections for IRIS:
red_ws = LoadNexusProcessed(Filename='irs26176_graphite002_red.nxs')
can_ws = LoadNexusProcessed(Filename='irs26173_graphite002_red.nxs')
corrected, fact = IndirectAnnulusAbsorption(SampleWorkspace=red_ws,
SampleChemicalFormula='H2-O',
CanWorkspace=can_ws,
CanChemicalFormula='H2-O',
CanInnerRadius=0.19,
SampleInnerRadius=0.2,
SampleOuterRadius=0.25,
CanOuterRadius=0.26,
Events=200,
UseCanCorrections=True,
Version=1)
ass = fact[0]
acc = fact[1]
print ('Corrected workspace is intensity against %s'
% (corrected.getAxis(0).getUnit().caption()))
print ('Ass workspace is %s against %s'
% (ass.YUnitLabel(), ass.getAxis(0).getUnit().caption()))
print ('Acc workspace is %s against %s'
% (acc.YUnitLabel(), acc.getAxis(0).getUnit().caption()))
Output:
Corrected workspace is intensity against Energy transfer
Ass workspace is Attenuation factor against Wavelength
Acc workspace is Attenuation factor against Wavelength
Categories: Algorithms | Workflow\Inelastic | CorrectionFunctions\AbsorptionCorrections | Workflow\MIDAS
Python: IndirectAnnulusAbsorption.py (last modified: 2016-10-19)