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

IndirectCylinderAbsorption v2

../_images/ImageNotFound.png

Enable screenshots using DOCS_SCREENSHOTS in CMake

Summary

Calculates indirect absorption corrections for a cylinder sample shape.

Properties

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)

SampleRadius

Input

number

0.1

Sample radius

SampleHeight

Input

number

1

Sample height

CanWorkspace

Input

MatrixWorkspace

Container workspace.

UseCanCorrections

Input

boolean

False

Use can corrections in subtraction

CanChemicalFormula

Input

string

Can chemical formula

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)

CanRadius

Input

number

0.2

Can radius

CanScaleFactor

Input

number

1

Scale factor to multiply can data

BeamHeight

Input

number

1

Height of the beam (cm)

BeamWidth

Input

number

1

Width of the beam (cm)

NumberWavelengths

Input

long

10

Number of wavelengths for calculation

Events

Input

long

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.

Description

Calculates and applies corrections for scattering and absorption in a cylindrical sample for a run on an indirect inelastic instrument, optionally allowing for the subtraction or corrections of the container. Uses MonteCarloAbsorption to calculate the corrections.

The correction factor workspace is a workspace group containing the correction factors in the Paalman and Pings format, note that only \({A_{s,s}}\) and \(A_{c,c}\) factors are calculated by this algorithm.

Workflow

../_images/ImageNotFound.png

diagram generation was disabled

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 - Sample corrections for IRIS:

red_ws = LoadNexusProcessed(Filename='irs26176_graphite002_red.nxs')
can_ws = LoadNexusProcessed(Filename='irs26173_graphite002_red.nxs')

corrected, fact = IndirectCylinderAbsorption(SampleWorkspace=red_ws,
                                             SampleChemicalFormula='H2-O',
                                             CanWorkspace=can_ws,
                                             CanScaleFactor=0.8,
                                             SampleRadius=0.1,
                                             UseCanCorrections=False,
                                             Events=100)

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 and container corrections for IRIS:

red_ws = LoadNexusProcessed(Filename='irs26176_graphite002_red.nxs')
can_ws = LoadNexusProcessed(Filename='irs26173_graphite002_red.nxs')

corrected, fact = IndirectCylinderAbsorption(SampleWorkspace=red_ws,
                                             SampleChemicalFormula='H2-O',
                                             SampleRadius=0.2,
                                             CanWorkspace=can_ws,
                                             CanScaleFactor=0.8,
                                             CanChemicalFormula='V',
                                             CanRadius=0.22,
                                             UseCanCorrections=True,
                                             Events=100)

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: AlgorithmIndex | Workflow\Inelastic | CorrectionFunctions\AbsorptionCorrections | Workflow\MIDAS

Source

Python: IndirectCylinderAbsorption2.py