Ticket #8530: ReflectometryQuick.py

File ReflectometryQuick.py, 1.1 KB (added by Keith Brown, 7 years ago)
Line 
1
2from mantid.simpleapi import *
3from isis_reflectometry import quick
4reload(quick)
5
6class ReflectometryQuick(object):
7    """
8    This is a system test for the top-level quick routines. Quick is the name given to the
9    ISIS reflectometry reduction scripts.
10   
11    """
12   
13    def runTest(self):
14        defaultInstKey = 'default.instrument'
15        defaultInstrument = config[defaultInstKey]
16       
17        config[defaultInstKey] = 'INTER'
18        LoadISISNexus(Filename='13463', OutputWorkspace='13463')
19        LoadISISNexus(Filename='13464', OutputWorkspace='13464')
20        LoadISISNexus(Filename='13460', OutputWorkspace='13460')
21   
22        transmissionRuns = '13463,13464'
23        runNo = '13460'
24        incidentAngle = 0.7
25        quick.quick(runNo, trans=transmissionRuns, theta=incidentAngle) 
26
27        config[defaultInstKey] = defaultInstrument
28       
29        standard_result = Load(Filename="QuickReferenceResult.nxs")
30        plotSpectrum([standard_result, '13460_IvsQ'], [0,1,2])
31           
32    def validate(self):
33        self.disableChecking.append('Instrument')
34        return '13460_IvsQ','QuickReferenceResult.nxs'
35       
36test = ReflectometryQuick()
37test.runTest()
38