1 | # Algorithm to start Bayes programs |
---|
2 | from mantid.simpleapi import * |
---|
3 | from mantid.kernel import StringListValidator, StringMandatoryValidator |
---|
4 | from mantid.api import PythonAlgorithm, AlgorithmFactory |
---|
5 | from mantid import config |
---|
6 | import os |
---|
7 | |
---|
8 | from IndirectImport import run_f2py_compatibility_test, is_supported_f2py_platform |
---|
9 | |
---|
10 | if is_supported_f2py_platform(): |
---|
11 | import IndirectBayes as Main |
---|
12 | |
---|
13 | run_f2py_compatibility_test() |
---|
14 | |
---|
15 | prog = 'QLwat' |
---|
16 | nbins = [1, 1] |
---|
17 | sname = 'irs26176_graphite002_red' |
---|
18 | rname = 'irs26173_graphite002_res' |
---|
19 | rsname = '' |
---|
20 | wfile = '' |
---|
21 | erange = [-0.5,0.5] |
---|
22 | fitOp = [False, 'Sloping', False, False] |
---|
23 | loopOp = True |
---|
24 | verbOp = False |
---|
25 | plotOp = 'None' |
---|
26 | saveOp = True |
---|
27 | |
---|
28 | workdir = config['defaultsave.directory'] |
---|
29 | spath = os.path.join(workdir, sname+'.nxs') # path name for sample nxs file |
---|
30 | LoadNexusProcessed(Filename=spath, OutputWorkspace=sname) |
---|
31 | rpath = os.path.join(workdir, rname+'.nxs') # path name for res nxs file |
---|
32 | LoadNexusProcessed(Filename=rpath, OutputWorkspace=rname) |
---|
33 | Main.QLRun(prog,sname,rname,rsname,erange,nbins,fitOp,wfile,loopOp,verbOp,plotOp,saveOp) |
---|