Ticket #3285: errorcheckinq.py

File errorcheckinq.py, 1.3 KB (added by Wenduo Zhou, 9 years ago)
Line 
1path = "/home/wzz/Projects/Mantid-Project/Tests/DiffractionFocussing/"
2
3# Load data
4LoadEventNexus(Filename=path+"PG3_2581_event.nxs", OutputWorkspace="PG3_RAW",CompressTolerance="0.050000000000000003")
5_instrument = "PG3"
6wksp = mtd["PG3_RAW"]
7LoadCalFile(InputWorkspace=wksp, CalFileName=path+"PG3_FERNS_2656_2011_03_20.cal", WorkspaceName=_instrument)
8CloneWorkspace(wksp, "BeforeAlignment")
9AlignDetectors(InputWorkspace=wksp, OutputWorkspace=wksp, OffsetsWorkspace=_instrument + "_offsets")
10CloneWorkspace(wksp, "AfterAlignment")
11ConvertUnits(InputWorkspace=wksp,OutputWorkspace="PG3_RAW_Q",Target="MomentumTransfer")
12Rebin(InputWorkspace="PG3_RAW_Q",OutputWorkspace="PG3_RAW_Q",Params="0,1,40")
13
14preserveevents = True
15
16# 2D version
17# CreateGroupingWorkspace(InstrumentName="PG3",GroupNames="bank124,bank144,bank164,bank184",OutputWorkspace="pg3_group")
18ConvertToMatrixWorkspace(InputWorkspace="PG3_RAW_Q",OutputWorkspace="PG3_RAW_Q_2D")
19DiffractionFocussing(InputWorkspace="PG3_RAW_Q_2D",OutputWorkspace="PG3_2D_FOC",GroupingWorkspace="PG3_group", 
20        PreserveEvents=preserveevents)
21
22# Event version
23DiffractionFocussing(InputWorkspace="PG3_RAW_Q",OutputWorkspace="PG3_EVENT_FOC",GroupingWorkspace="PG3_group",
24        PreserveEvents=preserveevents)
25
26Minus("PG3_EVENT_FOC", "PG3_2D_FOC", "PG3_diff")