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

PoldiFitPeaks1D v2

../_images/ImageNotFound.png

Enable screenshots using DOCS_SCREENSHOTS in CMake

Summary

PoldiPeakFit1D fits peak profiles to POLDI auto-correlation data.

See Also

PoldiFitPeaks2D

Properties

Name

Direction

Type

Default

Description

InputWorkspace

Input

Workspace2D

Mandatory

An input workspace containing a POLDI auto-correlation spectrum.

FwhmMultiples

Input

number

2

Each peak will be fitted using x times FWHM data in each direction.

AllowedOverlap

Input

number

0.25

If a fraction larger than this value overlaps with the next range, the ranges are merged.

MaximumRelativeFwhm

Input

number

0.02

Peaks with a relative FWHM higherthan this value will be excluded.

PeakFunction

Input

string

Gaussian

Peak function that will be fitted to all peaks. Allowed values: [‘AsymmetricPearsonVII’, ‘BackToBackExponential’, ‘Bk2BkExpConvPV’, ‘DeltaFunction’, ‘ElasticDiffRotDiscreteCircle’, ‘ElasticDiffSphere’, ‘ElasticIsoRotDiff’, ‘ExamplePeakFunction’, ‘Gaussian’, ‘IkedaCarpenterPV’, ‘Lorentzian’, ‘PseudoVoigt’, ‘Voigt’]

PoldiPeakTable

Input

TableWorkspace

Mandatory

A table workspace containing POLDI peak data.

OutputWorkspace

Output

TableWorkspace

Output workspace with refined peak data.

FitPlotsWorkspace

Output

Workspace

FitPlots

Plots of all peak fits.

Description

Version two of PoldiFitPeaks1D was introduced to solve problems with overlapping peaks. Instead of refining individual peaks, the algorithm defines a range of x-values around each peak. In a second step the algorithm checks whether neighboring ranges are overlapping and merges them if that’s the case. The amount of overlap that should be tolerated by the algorithm can be changed through the parameter AllowedOverlap, where 0 means that ranges that overlap in any way should be merged, while with 1, they are not merged at all. Merged ranges then contain more than one peak, which are refined together. This way, reasonable results can also be obtained for overlapping peaks.

Another thing that’s different from version 1 of the algorithm is the background description. When peaks overlap, the description with a quadratic function is not particularly suitable. Instead, Chebyshev-polynomes of degrees 0, 1 and 2 are fitted and the best solution (with respect to quality of the fit) is selected automatically.

Furthermore, after fitting peaks are inspected for meaningful results. Peaks with intensities below zero, too narrow or too broad profiles (the upper limit is specified by the MaximumRelativeFwhm-parameters) are excluded.

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.

The following usage example loads an example correlation spectrum that was calculated for a sample containing two compounds with very similar lattice parameters.

# Load correlation spectrum
Load(Filename='poldi_2_phases_theoretical_reference.nxs', OutputWorkspace='correlation_spectrum')

# Perform peak search
PoldiPeakSearch(InputWorkspace='correlation_spectrum', MinimumPeakSeparation=8, MaximumPeakNumber=12, MinimumPeakHeight=180, OutputWorkspace='peaks')

# Fit peaks with proper overlap handling
PoldiFitPeaks1D(InputWorkspace='correlation_spectrum', FwhmMultiples=2, AllowedOverlap=0.1, PoldiPeakTable='peaks')

Variation of the AllowedOverlap-parameter influences the quality of the fit at some point if it’s too close to 1. Setting it to 1 makes the algorithm’s behavior similar to that of version 1.

# Load correlation spectrum
Load(Filename='poldi_2_phases_theoretical_reference.nxs', OutputWorkspace='correlation_spectrum')

# Perform peak search
PoldiPeakSearch(InputWorkspace='correlation_spectrum', MinimumPeakSeparation=8, MaximumPeakNumber=9, MinimumPeakHeight=180, OutputWorkspace='peaks')

# Too large allowed overlap, fits will have bad quality.
PoldiFitPeaks1D(InputWorkspace='correlation_spectrum', FwhmMultiples=2, AllowedOverlap=0.9, PoldiPeakTable='peaks')

Categories: AlgorithmIndex | SINQ\Poldi

Source

C++ header: PoldiFitPeaks1D2.h

C++ source: PoldiFitPeaks1D2.cpp