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

BayesStretch v1

../_images/ImageNotFound.png

Enable screenshots using DOCS_SCREENSHOTS in CMake

Summary

This is a variation of the stretched exponential option of Quasi.

Properties

Name

Direction

Type

Default

Description

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 fitting range

EMax

Input

number

0.2

The end of the fitting range

SampleBins

Input

long

1

The number of sample bins

Elastic

Input

boolean

True

Fit option for using the elastic peak

Background

Input

string

Flat

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

NumberSigma

Input

long

50

Number of sigma values

NumberBeta

Input

long

30

Number of beta values

Loop

Input

boolean

True

Switch Sequential fit On/Off

OutputWorkspaceFit

Output

WorkspaceGroup

Mandatory

The name of the fit output workspaces

OutputWorkspaceContour

Output

WorkspaceGroup

Mandatory

The name of the contour output workspaces

Description

This is a variation of the stretched exponential option of Quasi. For each spectrum a fit is performed for a grid of \(\beta\) and \(\sigma\) values. The distribution of goodness of fit values is plotted.

This routine was originally part of the MODES package. Note that this algorithm uses F2Py and is currently only supported on Windows.

Usage

Example - BayesStretch

# Check OS support for F2Py (Windows only)
from IndirectImport import is_supported_f2py_platform
if is_supported_f2py_platform():
    # Load in test data
    sample_ws = Load('irs26176_graphite002_red.nxs')
    resolution_ws = Load('irs26173_graphite002_red.nxs')

    # Run BayesStretch algorithm
    fit_group, contour_group = BayesStretch(SampleWorkspace=sample_ws, ResolutionWorkspace=resolution_ws,
                                            EMin=-0.2, EMax=0.2, Background='Sloping', Loop=True)

Categories: AlgorithmIndex | Workflow\MIDAS

Source

Python: BayesStretch.py