1 | from MantidFramework import * |
---|
2 | from mantidsimple import * |
---|
3 | mtd.initialise(False) |
---|
4 | import os |
---|
5 | |
---|
6 | TEST_DIR = "../../../Test/Data/SANS2D/" |
---|
7 | filepath = os.path.join(TEST_DIR, "BioSANS_test_data.xml") |
---|
8 | instrpath = "../../../Test/Instrument/BIOSANS_Definition.xml" |
---|
9 | |
---|
10 | success = True |
---|
11 | |
---|
12 | loader = LoadSpice2D(filepath, "test") |
---|
13 | test1 = mtd['test'].getInstrument().getComponentByName("detector1").getPos().getZ()==6.0 |
---|
14 | test2 = mtd['test'].getInstrument().getStringParameter("detector-name")[0] == 'detector1' |
---|
15 | |
---|
16 | LoadEmptyInstrument(instrpath, 'inst') |
---|
17 | loader = LoadSpice2D(filepath, "test") |
---|
18 | test3 = mtd['test'].getInstrument().getComponentByName("detector1").getPos().getZ()==6.0 |
---|
19 | test4 = len(mtd['test'].getInstrument().getStringParameter("detector-name")) == 1 |
---|
20 | test5 = mtd['inst'].getInstrument().getStringParameter("detector-name")[0] == 'detector1' |
---|
21 | |
---|
22 | print "SUCCESS ? " |
---|
23 | print test1 |
---|
24 | print test2 |
---|
25 | print test3 |
---|
26 | print test4 |
---|
27 | print test5 |
---|
28 | |
---|