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

BayesQuasi2 v1

Summary

This algorithm uses the Python quickBayes package to fit the quasielastic data (Lorentzians or stretched exponential).

Properties

Name

Direction

Type

Default

Description

Program

Input

string

QL

The type of program to run (either QL or QSe). Allowed values: [‘QL’, ‘QSe’]

SampleWorkspace

Input

MatrixWorkspace

Mandatory

Name of the Sample input Workspace

ResolutionWorkspace

Input

MatrixWorkspace

Mandatory

Name of the resolution input Workspace

EMin

Input

number

-0.2

The start of the fit range. Default=-0.2

EMax

Input

number

0.2

The end of the fit range. Default=0.2

Elastic

Input

boolean

True

Fit option for using the elastic peak

Background

Input

string

Flat

Fit option for the type of background. Allowed values: [‘Linear’, ‘Flat’, ‘None’]

OutputWorkspaceFit

Output

WorkspaceGroup

Mandatory

The name of the fit output workspaces

OutputWorkspaceResult

Output

MatrixWorkspace

The name of the result output workspaces

OutputWorkspaceProb

Output

MatrixWorkspace

The name of the probability output workspaces

Description

This algorithm replaces BayesQuasi.

The algorithm has two modes, QL and QSe. These two modes are the same, except for the fitting function being used. The sample and resolution are cropped and rebinned so that they have the same binning. The fitting function is then generated with the user selected background plus a convolution of the resolution data with a delta function (if elastic) and one of the following:

  • one, two and three Lorentzians for the QL mode

  • one stretched exponential for the QSe mode

The output includes a workspace of the fitting parameters, the loglikelihoods (the least negative is the most likely fit) and the fits (interpolated back onto the original sample binning).

The stretched exponential results for the FWHM are different to BayesQuasi, as shown by the figure below. However, the new results agree with the FWHM values for fitting a single Lorentzian (‘QL’). The new method provides FWHM results that are comparable for all \(Q\) values (green and black data), unlike the original code that has a divergence for low :math`Q` values.

qse_cf.png

Categories: AlgorithmIndex | Workflow\MIDAS

Source

Python: BayesQuasi2.py