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

WANDPowderReduction v1

../_images/WANDPowderReduction-v1_dlg.png

WANDPowderReduction dialog.

Summary

Performs powder diffraction data reduction for WAND

Properties

Name Direction Type Default Description
InputWorkspace Input str list   The main input workspace[s].
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
Target Input string Mandatory The unit to which spectrum axis is converted to - “theta” (for the angle in degrees), Q or Q^2, where elastic Q is evaluated at EFixed. InPlaneTwoTheta and SignedInPlaneTwoTheta are the angle when each point is projected on the horizontal plane.Note that ‘theta’ and ‘signed_theta’ are there for compatibility purposes; they are the same as ‘Theta’ and ‘SignedTheta’ respectively. Allowed values: [‘Theta’, ‘SignedTheta’, ‘InPlaneTwoTheta’, ‘SignedInPlaneTwoTheta’, ‘ElasticQ’, ‘ElasticQSquared’, ‘theta’, ‘signed_theta’, ‘ElasticDSpacing’]
EFixed Input number Optional Value of fixed energy in meV : EI (EMode=Direct) or EF (EMode=Indirect))
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)
NumberBins Input number Mandatory Number of bins to split up each spectrum into.
LogBinning Input boolean False Use logarithmic binning. If false use constant step sizes.
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 as the wavelength/energy will be set correctly and monitor counts correctly taken into account for normalization. This algorithm will work on data loaded with LoadEventNexus or the grouped output from FilterEvents but you will need to specify EFixed if converting to anything except Theta.

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 (last modified: 2020-12-10)