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

WANDPowderReduction v1

Summary

Performs powder diffraction data reduction for WAND

See Also

LoadWAND, SaveFocusedXYE

Properties

Name

Direction

Type

Default

Description

InputWorkspace

Input

str list

Mandatory

The main input workspace[s]. Allowed values: [‘002192_Beam’, ‘002192_Beam_Flux’, ‘002193_Transmission’, ‘002194_Transmission’, ‘002195_Transmission’, ‘002196_Transmission’, ‘002197_Transmission’, ‘002219_Beam’, ‘002219_Beam_Flux’, ‘002227_Absorber’, ‘002228_Container’, ‘AgBE’, ‘AgBE_#1_d2.0m_c7.8m_w6.0A’, ‘D2O’, ‘D2O_#1_d2.0m_c7.8m_w6.0A’, ‘D33Mask2’, ‘D33_2m_SolidAngle’, ‘F127_D2O’, ‘F127_D2O_#1_d2.0m_c7.8m_w6.0A’, ‘F127_D2O_Anethol’, ‘F127_D2O_Anethol_#1_d2.0m_c7.8m_w6.0A’, ‘H2O’, ‘H2O_#1_d2.0m_c7.8m_w6.0A’, ‘SofTT’, ‘stitched’, ‘stitched_wav’, ‘trans1’, ‘trans1_wav’, ‘trans2’, ‘trans2_wav’, ‘ws’, ‘ws1’, ‘ws2’]

FilteredInput

Input

boolean

False

Specifies whether the input workspace was obtained from event filtering.

BackgroundWorkspace

Input

MatrixWorkspace

The background workspace to be subtracted.

CalibrationWorkspace

Input

MatrixWorkspace

The calibration (vanadium) workspace.

BackgroundScale

Input

number

1

The background will be scaled by this number before being subtracted.

MaskWorkspace

Input

MaskWorkspace

The mask from this workspace will be applied before reduction

Wavelength

Input

number

1.4865

Wavelength to set the workspace (A)

Target

Input

string

Mandatory

The unit to which spectrum axis is converted to. Allowed values: [‘Theta’, ‘ElasticQ’, ‘ElasticDSpacing’]

XMin

Input

dbl list

A comma separated list of the XMin for every spectrum. (Optional)

XMax

Input

dbl list

A comma separated list of the XMax for every spectrum. (Optional)

LogBinning

Input

boolean

False

Use logarithmic binning. If false use constant step sizes.

NumberBins

Input

number

1000

Number of bins to split up each spectrum into.

NormaliseBy

Input

string

Monitor

Normalise to monitor or time. Allowed values: [‘None’, ‘Time’, ‘Monitor’]

MaskAngle

Input

number

Optional

Phi angle above which will be masked. See MaskAngle for details.

OutputWorkspace

Output

Workspace

Mandatory

Output Workspace

Sum

Input

boolean

False

Specifies either single output workspace or output group workspace containing several workspaces.

Description

This algorithm performs powder diffraction data reduction for WAND² with calibration, monitor normalization and background subtraction. The CalibrationWorkspace will most likely be a vanadium and will correct for the detector sensitivity. The data can be normalized by monitor count or time. The output workspace can be saved to various formats with SaveFocusedXYE.

It is recommenced to load WAND data with LoadWAND. This algorithm will work on data loaded with LoadEventNexus or the grouped output from FilterEvents.

MaskAngle

The MaskAngle option will mask any out-of-plane (phi angle) detector larger than this value using MaskAngle. This can help with peak sharpness by removing regions where there is large peak broadening due to the divergent beam. The example below using MaskAngle of 10.

../_images/WANDPowderReduction_MaskAngle.png

Usage

Silicon powder

silicon =LoadWAND('/HFIR/HB2C/IPTS-7776/nexus/HB2C_26506.nxs.h5')
vanadium=LoadWAND('/HFIR/HB2C/IPTS-7776/nexus/HB2C_26509.nxs.h5')

WANDPowderReduction(InputWorkspace=silicon,
                    CalibrationWorkspace=vanadium,
                    Target='Theta',
                    NumberBins=1000,
                    OutputWorkspace='silicon_powder',
                    Sum=False)
../_images/WANDPowderReduction_silicon_powder.png

Silicon powder to Q over limited range

silicon =LoadWAND('/HFIR/HB2C/IPTS-7776/nexus/HB2C_26506.nxs.h5')
vanadium=LoadWAND('/HFIR/HB2C/IPTS-7776/nexus/HB2C_26509.nxs.h5')

WANDPowderReduction(InputWorkspace=silicon,
                    CalibrationWorkspace=vanadium,
                    Target='ElasticQ',
                    XMin=4.5,
                    Xmax=6.25,
                    NumberBins=500,
                    OutputWorkspace='silicon_powder_q',
                    Sum=False)
../_images/WANDPowderReduction_silicon_powder_q.png

Silicon powder to D spacing

silicon2=LoadWAND('/HFIR/HB2C/IPTS-7776/nexus/HB2C_26507.nxs.h5')
vanadium=LoadWAND('/HFIR/HB2C/IPTS-7776/nexus/HB2C_26509.nxs.h5')

WANDPowderReduction(InputWorkspace=silicon2,
                    CalibrationWorkspace=vanadium,
                    Target='ElasticDSpacing',
                    NumberBins=1000,
                    OutputWorkspace='silicon_powder_d_spacing',
                    Sum=False)
../_images/WANDPowderReduction_silicon_powder_d.png

Background subtraction

silicon =LoadWAND('/HFIR/HB2C/IPTS-7776/nexus/HB2C_26506.nxs.h5')
vanadium=LoadWAND('/HFIR/HB2C/IPTS-7776/nexus/HB2C_26509.nxs.h5')

# Create fake flat background, constant 10
bkg=CreateWorkspace(DataX=[1.487,1.489]*silicon.getNumberHistograms(),
                    DataY=[10]*silicon.getNumberHistograms(),
                    NSpec=silicon.getNumberHistograms(),
                    UnitX="Wavelength",ParentWorkspace=silicon)

WANDPowderReduction(InputWorkspace=silicon,
                    CalibrationWorkspace=vanadium,
                    BackgroundWorkspace=bkg,
                    Target='Theta',
                    NumberBins=1000,
                    OutputWorkspace='silicon_powder_background',
                    Sum=False)

# Scale background by 50%
WANDPowderReduction(InputWorkspace=silicon,
                    CalibrationWorkspace=vanadium,
                    BackgroundWorkspace=bkg,
                    BackgroundScale=0.5,
                    Target='Theta',
                    NumberBins=1000,
                    OutputWorkspace='silicon_powder_background_0.5',
                    Sum=False)
../_images/WANDPowderReduction_silicon_powder_bkg.png

Using multiple input workspaces

si1 = LoadWAND('/HFIR/HB2C/IPTS-22745/nexus/HB2C_320234.nxs.h5')
si2 = LoadWAND('/HFIR/HB2C/IPTS-22745/nexus/HB2C_320235.nxs.h5')
va0 = LoadWAND('/HFIR/HB2C/IPTS-23858/nexus/HB2C_320259.nxs.h5')

# single ws
WANDPowderReduction(
      InputWorkspace=si1,
      CalibrationWorkspace=va0,
      Target='Theta',
      NumberBins=1000,
      NormaliseBy='Time',
      OutputWorkspace=f'si1_reduced',
      Sum=False,
      )

# single ws
WANDPowderReduction(
      InputWorkspace=si2,
      CalibrationWorkspace=va0,
      Target='Theta',
      NumberBins=1000,
      NormaliseBy='Time',
      OutputWorkspace=f'si2_reduced',
      Sum=False,
      )

# merged ws - single (summed) output ws
WANDPowderReduction(
      InputWorkspace=[si1, si2],
      CalibrationWorkspace=va0,
      Target='Theta',
      NumberBins=1000,
      NormaliseBy='Time',
      OutputWorkspace=f'si_reduced',
      Sum=True,
      )

# merged ws - group output ws
WANDPowderReduction(
      InputWorkspace=[si1, si2],
      CalibrationWorkspace=va0,
      Target='Theta',
      NumberBins=1000,
      NormaliseBy='Time',
      OutputWorkspace=f'si_reduced',
      Sum=False,
      )
../_images/WANDPowderReduction_silicon_powder_multiple_input.png

Categories: AlgorithmIndex | Diffraction\Reduction

Source

Python: WANDPowderReduction.py