1 | test_num = 1 |
---|
2 | testnames =['EQSANSTransmissionDC', |
---|
3 | 'EQSANSTransmissionEvent', |
---|
4 | 'EQSANSTransmission', |
---|
5 | 'JumpCETest', |
---|
6 | 'JumpFickTest', |
---|
7 | 'JumpSSTest', |
---|
8 | 'LOQCentreNoGravDefineCentre', |
---|
9 | 'LOQCentreNoGrav', |
---|
10 | 'LOQMinimalBatchReduction', |
---|
11 | 'LOQReductionOnLoadedWorkspaceMustProduceTheSameResult_1', |
---|
12 | 'LOQReductionOnLoadedWorkspaceMustProduceTheSameResult_2', |
---|
13 | 'LOQTransFitWorkspace2D', |
---|
14 | 'LOQTransFitWorkspace2DWithLoadedWorkspace', |
---|
15 | 'SANS2DWaveloops', |
---|
16 | 'SANS2DWaveloopsReloadWorkspace', |
---|
17 | 'SANSLOQBatch', |
---|
18 | 'VesuvioFittingTest', |
---|
19 | 'VesuvioFittingWithKFreeTest', |
---|
20 | 'VesuvioFittingWithQuadraticBackgroundTest' |
---|
21 | ] |
---|
22 | print len(testnames) |
---|
23 | testname = testnames[test_num] |
---|
24 | print testname |
---|
25 | original_name = testname |
---|
26 | current_name = testname+'-mismatch' |
---|
27 | |
---|
28 | |
---|
29 | new_matches = {'SANS2DWaveloopsReloadWorkspace':'SANS2DWaveloops.nxs', |
---|
30 | 'LOQTransFitWorkspace2DWithLoadedWorkspace':'LOQTransFitWorkspace2D.nxs', |
---|
31 | 'LOQReductionOnLoadedWorkspaceMustProduceTheSameResult_2':'LOQCentreNoGrav.nxs', |
---|
32 | 'LOQCentreNoGravDefineCentre': 'LOQCentreNoGrav.nxs', |
---|
33 | 'LOQReductionOnLoadedWorkspaceMustProduceTheSameResult_1':'LOQCentreNoGravSearchCentreFixed.nxs', |
---|
34 | 'LOQMinimalBatchReduction':'LOQReductionMergedData.nxs', |
---|
35 | 'JumpSSTest':'ISISIndirectBayes_JumpSSTest.nxs', |
---|
36 | 'JumpCETest':'ISISIndirectBayes_JumpCETest.nxs', |
---|
37 | 'JumpFickTest':'ISISIndirectBayes_JumpFickTest.nxs', |
---|
38 | 'EQSANSTransmission':'EQSANSTrans.nxs', |
---|
39 | 'EQSANSTransmissionEvent':'EQSANSTransEvent.nxs' |
---|
40 | } |
---|
41 | |
---|
42 | for k,v in new_matches.items(): |
---|
43 | if testname == k: original_name = v |
---|
44 | |
---|
45 | |
---|
46 | mtd.clear() |
---|
47 | |
---|
48 | ws1 = Load(original_name) |
---|
49 | ws2 = Load(current_name) |
---|
50 | |
---|
51 | |
---|
52 | |
---|
53 | def compareErrors(ws1, ws2, index): |
---|
54 | axisX = range(len(ws1.readE(index))) |
---|
55 | original = CreateWorkspace(axisX, ws1.readE(index), OutputWorkspace='original'+str(index)) |
---|
56 | new_err = CreateWorkspace(axisX, ws2.readE(index), OutputWorkspace='new_err'+str(index)) |
---|
57 | a = plotSpectrum(original, 0) |
---|
58 | plotSpectrum(new_err, 0, window=a) |
---|
59 | b = plotSpectrum(ws1, index, True) |
---|
60 | plotSpectrum(ws2, index, True, window=b) |
---|
61 | |
---|
62 | |
---|
63 | for i in range(ws1.getNumberHistograms()): |
---|
64 | compareErrors(ws1, ws2, i) |
---|
65 | |
---|