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

PeakIntensityVsRadius v1

../_images/PeakIntensityVsRadius-v1_dlg.png

PeakIntensityVsRadius dialog.

Summary

Calculate the integrated intensity of peaks vs integration radius.

See Also

PeakIntegration

Properties

Name

Direction

Type

Default

Description

InputWorkspace

Input

MDEventWorkspace

Mandatory

An input MDEventWorkspace containing the SCD data.

PeaksWorkspace

Input

PeaksWorkspace

Mandatory

The list of peaks to integrate, matching the InputWorkspace.

RadiusStart

Input

number

0

Radius at which to start integrating.

RadiusEnd

Input

number

1

Radius at which to stop integrating.

NumSteps

Input

number

10

Number of steps, between start and end, to calculate radius.

BackgroundInnerFactor

Input

number

0

For background subtraction: the peak radius will be multiplied by this factor and passed to the BackgroundInnerRadius parameter. Default 0.0 (no background).

BackgroundOuterFactor

Input

number

0

For background subtraction: the peak radius will be multiplied by this factor and passed to the BackgroundOuterRadius parameter. Default 0.0 (no background).

BackgroundInnerRadius

Input

number

0

For background subtraction: Specify a fixed BackgroundInnerRadius, which does not change with PeakRadius. Default 0.0 (no background).

BackgroundOuterRadius

Input

number

0

For background subtraction: Specify a fixed BackgroundOuterRadius, which does not change with PeakRadius. Default 0.0 (no background).

OutputWorkspace

Output

MatrixWorkspace

Mandatory

An output workspace2D containing intensity vs radius.

OutputWorkspace2

Output

MatrixWorkspace

NumberPeaksIntegrated

An output workspace2D containing number of peaks at levels of I/sigI vs radius.

Description

Integrates SCD peaks with a range of radii, in order to plot graphs of the integrated intensity vs radius. This can be useful to determine the correct integration radius for each peak.

{Integrated peak intensity vs integration radius for 3 SCD peaks}

The algorithm requires a MDWorkspace of SCD data in reciprocal space; generated by e.g. ConvertToDiffractionMDWorkspace v3. Also, you will need a PeaksWorkspace as the list of peaks to integrate. This can be generated using FindPeaksMD v1, for example.

The output will be a Workspace2D with one spectrum per peak, where:

  • X = peak radius

  • Y/E = integrated intensity and error for the corresponding radius.

  • Each peak is labeled with a string with “H K L”. Use IndexPeaks v1 to automatically find HKL values for peaks.

This algorithm calls IntegratePeaksMD v2 repeatedly, with the following parameters filled in:

  • PeakRadius = the radius, ranging from RadiusStart to RadiusEnd in NumSteps steps.

  • BackgroundInnerRadius = radius * BackgroundInnerFactor OR BackgroundInnerRadius

  • BackgroundOuterRadius = radius * BackgroundOuterFactor OR BackgroundOuterRadius

Usage

Example - PeakIntensityVsRadius:

The code itself works but disabled from doc tests as takes too long to complete. User should provide its own event nexus file instead of TOPAZ_3132_event.nxs used within this example. The original TOPAZ_3132_event.nxs file is available in Mantid system tests repository.

# Load a SCD data set from systemtests Data and find the peaks
LoadEventNexus(Filename=r'TOPAZ_3132_event.nxs',OutputWorkspace='TOPAZ_3132_nxs')
ConvertToDiffractionMDWorkspace(InputWorkspace='TOPAZ_3132_nxs',OutputWorkspace='TOPAZ_3132_md',LorentzCorrection='1')
FindPeaksMD(InputWorkspace='TOPAZ_3132_md',PeakDistanceThreshold='0.15',MaxPeaks='100',OutputWorkspace='peaks')
FindUBUsingFFT(PeaksWorkspace='peaks',MinD='2',MaxD='16')
IndexPeaks(PeaksWorkspace='peaks')

# Run the PeakIntensityVsRadius algorithm, where the background shell scales with the PeakRadius
PeakIntensityVsRadius(InputWorkspace='TOPAZ_3132_md',PeaksWorkspace='peaks',
    RadiusStart=0.00, RadiusEnd=0.15, NumSteps=51,
    BackgroundInnerFactor=1.5,BackgroundOuterFactor=2,
    OutputWorkspace='peak_vs_rad')

# Run the PeakIntensityVsRadius algorithm, with fixed background shell radius
PeakIntensityVsRadius(InputWorkspace='TOPAZ_3132_md',PeaksWorkspace='peaks',
    RadiusStart=0.00, RadiusEnd=0.15, NumSteps=51,
    BackgroundInnerRadius=0.15,BackgroundOuterRadius=0.2,
    OutputWorkspace='peak_vs_rad_fixed')

# Plot a few of the peaks
plotSpectrum('peak_vs_rad', [0,2,3], error_bars=True)

Categories: AlgorithmIndex | Crystal\Integration

Source

C++ header: PeakIntensityVsRadius.h

C++ source: PeakIntensityVsRadius.cpp