FindEPP v1

../_images/FindEPP-v1_dlg.png

FindEPP dialog.

Summary

Performs Gaussian fit of all spectra to find the elastic peak position.

Properties

Name Direction Type Default Description
InputWorkspace Input MatrixWorkspace Mandatory Input Sample or Vanadium workspace
OutputWorkspace Output TableWorkspace Mandatory The name of the table workspace that will be created.

Description

This utility algorithm attempts to search for the elastic peak position (EPP) in each spectrum of the given workspace. The algorithm estimates the starting parameters and performs Gaussian fit using the Fit v1 algorithm.

Note

This algorithm uses very simple approach to search for an elastic peak: it suggests that the elastic peak has maximal intensity. This approach may fail in the case if the dataset contains Bragg peaks with higher intensities.

As a result, TableWorkspace with the following columns is produced: WorkspaceIndex, PeakCentre, PeakCentreError, Sigma, SigmaError, Height, HeightError, chiSq and FitStatus. Table rows correspond to the workspace indices.

Usage

Example: Find EPP in the given workspace.

# create sample workspace
ws = CreateSampleWorkspace(Function="User Defined", UserDefinedFunction="name=LinearBackground, \
            A0=0.3;name=Gaussian, PeakCentre=6000, Height=5, Sigma=75", NumBanks=2, BankPixelWidth=1,
            XMin=4005.75, XMax=7995.75, BinWidth=10.5, BankDistanceFromSample=4.0)

# search for elastic peak positions
table = FindEPP(ws, Version=1)

# print some results
print("The fit status is {}".format(table.row(0)['FitStatus']))
print("The peak centre is at {} microseconds".format(round(table.row(0)['PeakCentre'], 2)))
print("The peak height is {}".format(round(table.row(0)['Height'],2)))

Output:

The fit status is success
The peak centre is at 6005.25 microseconds
The peak height is 4.84

Categories: Algorithm Index | Workflow\MLZ\TOFTOF | Utility

Source

Python: FindEPP.py (last modified: 2018-10-05)