Ticket #9855: problem.py

File problem.py, 768 bytes (added by Wenduo Zhou, 6 years ago)
Line 
1SHOWPROBLEM = True
2
3LoadEventNexus(Filename='/SNS/CORELLI/IPTS-12008/nexus/CORELLI_687.nxs.h5', OutputWorkspace='COR_687')
4ConvertUnits(InputWorkspace='COR_687', OutputWorkspace='COR_687_d', Target='dSpacing')
5
6if SHOWPROBLEM is False:
7  Rebin(InputWorkspace='COR_687_d', OutputWorkspace='COR_687_d', Params='0.04')
8else:
9  Rebin(InputWorkspace='COR_687_d', OutputWorkspace='COR_687_d', Params='0.004')
10 
11ws = mtd["COR_687_d"]
12print "After Rebin in d-spacing, Memory size of workspace %s is %.5f MB" %(str(ws), ws.getMemorySize()/1024./1024.)
13
14ConvertUnits(InputWorkspace='COR_687_d', OutputWorkspace='COR_687_d', Target='TOF')
15
16ws = mtd["COR_687_d"]
17print "After ConvertUnits to TOF, Memory size of workspace %s is %.5f MB" %(str(ws), ws.getMemorySize()/1024./1024.)