BayesQuasi v1¶
Summary¶
This algorithm runs the Fortran QLines programs which fits a Delta function of amplitude 0 and Lorentzians of amplitude A(j) and HWHM W(j) where j=1,2,3. The whole function is then convolved with the resolution function.
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 |
Mandatory |
Name of the Sample input Workspace |
|
ResolutionWorkspace |
Input |
Mandatory |
Name of the resolution input Workspace |
|
ResNormWorkspace |
Input |
WorkspaceGroup |
Name of the ResNorm input Workspace |
|
MinRange |
Input |
number |
-0.2 |
The start of the fit range. Default=-0.2 |
MaxRange |
Input |
number |
0.2 |
The end of the fit range. Default=0.2 |
SampleBins |
Input |
number |
1 |
The number of sample bins |
ResolutionBins |
Input |
number |
1 |
The number of resolution 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’] |
FixedWidth |
Input |
boolean |
True |
Fit option for using FixedWidth |
UseResNorm |
Input |
boolean |
False |
fit option for using ResNorm |
WidthFile |
Input |
string |
The name of the fixedWidth file |
|
Loop |
Input |
boolean |
True |
Switch Sequential fit On/Off |
OutputWorkspaceFit |
Output |
WorkspaceGroup |
Mandatory |
The name of the fit output workspaces |
OutputWorkspaceResult |
Output |
Mandatory |
The name of the result output workspaces |
|
OutputWorkspaceProb |
Output |
The name of the probability output workspaces |
Description¶
This algorithm can only be run on windows due to f2py support and the underlying fortran code
The model that is being fitted is that of a delta-function (elastic component) of amplitude A(0) and Lorentzians of amplitude A(j) and HWHM W(j) where j=1,2,3. The whole function is then convolved with the resolution function. The -function and Lorentzians are intrinsically normalised to unity so that the amplitudes represent their integrated areas.
For a Lorentzian, the Fourier transform does the conversion:
For a Stretched Exponential, the choice of several Lorentzians is replaced with a single function with the shape :
Usage¶
Example - BayesQuasi
# Load in test data
sampleWs = Load('irs26176_graphite002_red.nxs')
resWs = Load('irs26173_graphite002_red.nxs')
# Run BayesQuasi algorithm
fit_ws, result_ws, prob_ws = BayesQuasi(Program='QL', SampleWorkspace=sampleWs, ResolutionWorkspace=resWs,
MinRange=-0.547607, MaxRange=0.543216, SampleBins=1, ResolutionBins=1,
Elastic=False, Background='Sloping', FixedWidth=False, UseResNorm=False,
WidthFile='', Loop=True)
Categories: AlgorithmIndex | Workflow\MIDAS
Source¶
Python: BayesQuasi.py