Ticket #8147: test_8147.py

File test_8147.py, 847 bytes (added by Gesner Passos, 7 years ago)
Line 
1from mantid.simpleapi import *
2from mantid import config
3import ISISCommandInterface as ici
4import SANSBatchMode as batch
5import SANSadd2 as sansadd
6
7output_file = '99630sannotrans'
8csv_file = 'input.csv'
9result = ''
10
11
12f = open(csv_file,'w')
13print >> f, "sample_sans,99630-add,output_as, %s"%output_file
14f.close()
15runnum = '99630'
16sansadd.add_runs((runnum, runnum),'LOQ','.RAW')
17
18
19ici.LOQ()
20ici.Detector("main-detector-bank")
21ici.Set1D()
22ici.MaskFile('MASK.094AA')   
23batch.BatchReduce(csv_file, 'nxs', plotresults=False)
24   
25
26ici._refresh_singleton() 
27ici.LOQ()
28ici.Detector("main-detector-bank")
29ici.Set1D()
30ici.MaskFile('MASK.094AA')
31LOQ99630 = Load('LOQ'+runnum+'.RAW')
32LOQ99630 += LOQ99630
33ici.AssignSample(LOQ99630, reload=False)
34result = ici.WavRangeReduction(None,None,None)
35
36print CheckWorkspacesMatch('99630sannotrans', result, 1.e-8)