Ticket #8738: QLwater_test.py

File QLwater_test.py, 1.0 KB (added by Samuel Jackson, 7 years ago)

Testing script

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