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