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

StripVanadiumPeaks v2

Summary

This algorithm removes peaks (at vanadium d-spacing positions by default) out of a background by linearly/quadratically interpolating over the expected peak positions.

See Also

FindPeaks, StripPeaks

Properties

Name

Direction

Type

Default

Description

InputWorkspace

Input

MatrixWorkspace

Mandatory

Name of the input workspace. If you use the default vanadium peak positions are used, the workspace must be in units of d-spacing.

OutputWorkspace

Output

MatrixWorkspace

Mandatory

The name of the workspace to be created as the output of the algorithm. If the input workspace is an EventWorkspace, then the output must be different (and will be made into a Workspace2D).

FWHM

Input

number

7

The number of points covered, on average, by the fwhm of a peak (default 7). Passed through to [[FindPeaks]].

Tolerance

Input

number

4

A measure of the strictness desired in meeting the condition on peak candidates, Mariscotti recommends 2 (default 4)

BackgroundType

Input

string

Linear

Type of Background. Present choices include ‘Linear’ and ‘Quadratic’. Allowed values: [‘Linear’, ‘Quadratic’]

HighBackground

Input

boolean

True

Flag whether the input data has high background compared to peak heights.

PeakPositionTolerance

Input

number

0.01

Tolerance on the found peaks’ positions against the input peak positions. Non-positive value indicates that this option is turned off.

WorkspaceIndex

Input

number

Optional

If set, will remove peaks only in the given spectrum of the workspace. Otherwise, all spectra will be searched.

Description

This is a wrapper for StripPeaks v1 algorithm used with the peak positions for Vanadium.

  • A list of vanadium peak positions in d-spacing is used for the central peak positions: 0.5044,0.5191,0.5350,0.5526,0.5936,0.6178,0.6453,0.6768,0.7134,0.7566,0.8089,0.8737,0.9571,1.0701,1.2356,1.5133,2.1401

  • The vanadium peaks are fit to a function combined from Gaussian and linear/quadratic background.

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:

ws = Load("PG3_733.nxs")
wsOut = StripVanadiumPeaks(ws,BackgroundType="Linear",WorkspaceIndex=2)
i = 1529
print("This peak at %.4f Angstroms has been reduced from %.0f to a background level of %.0f" % (wsOut.readX(2)[i],ws.readY(2)[i], wsOut.readY(2)[i]))

Output:

This peak at ... Angstroms has been reduced from ... to a background level of ...

Categories: AlgorithmIndex | CorrectionFunctions\PeakCorrections | Optimization\PeakFinding | Diffraction\Corrections

Source

C++ header: StripVanadiumPeaks2.h

C++ source: StripVanadiumPeaks2.cpp