Ticket #6844: verify6844.py

File verify6844.py, 1.5 KB (added by Wenduo Zhou, 7 years ago)
Line 
1######################################################################
2#Python Script Generated by GeneratePythonScript Algorithm
3######################################################################
4import mantid.simpleapi as api 
5
6# 1. Load event Nexus
7Load(Filename=r'/SNS/VULCAN/IPTS-7727/0/20002/NeXus/VULCAN_20002_event.nxs',OutputWorkspace='VULCAN_20002_event')
8
9# 2. Create correction table
10api.CreateLogTimeCorrection(InputWorkspace='VULCAN_20002_event',OutputWorkspace='VULCAN_Correction')
11
12# 3. Generate event filters by log "Special1_0" (electric field).  There are 2 log values of this log, 2 and 3.
13api.GenerateEventsFilter(InputWorkspace='VULCAN_20002_event',OutputWorkspace='VULCAN_20002_EField_Filter',InformationWorkspace='VULCAN_20002_EField_Info',LogName='Special1_0',MinimumLogValue='1.99',MaximumLogValue='3.0099999999999998',LogValueInterval='0.59999999999999998')
14
15# 4. Filter events using correction table
16api.FilterEvents(InputWorkspace='VULCAN_20002_event',
17        OutputWorkspaceBaseName='VULCAN_20002_Splitted',
18        InformationWorkspace='VULCAN_20002_EField_Info',
19        SplitterWorkspace='VULCAN_20002_EField_Filter',
20        DetectorTOFCorrectionWorkspace='VULCAN_Correction',
21        GroupWorkspaces='1')
22
23# 5. Filter events without correction
24api.FilterEvents(InputWorkspace='VULCAN_20002_event',
25        OutputWorkspaceBaseName='VULCAN_20002_NoCorrection',
26        InformationWorkspace='VULCAN_20002_EField_Info',
27        SplitterWorkspace='VULCAN_20002_EField_Filter',
28        GroupWorkspaces='1')