Ticket #4998: test4995.py

File test4995.py, 1.8 KB (added by Vickie Lynch, 8 years ago)
Line 
1# Basic parameters  for  Triphylite Crystal
2#Name of the workspaces to create
3ws = "TOPAZ_3132"
4filename = ws+"_event.nxs"
5LoadEventNexus(Filename=filename,OutputWorkspace=ws,FilterByTofMin='3000',FilterByTofMax='16000')
6
7# Load optimized DetCal file
8#LoadIsawDetCal(InputWorkspace=ws,Filename="/SNS/TOPAZ/shared/Spectra/TOPAZ_8Sept11.DetCal")
9
10# Spherical Absorption and Lorentz Corrections
11AnvredCorrection(InputWorkspace=ws,OutputWorkspace=ws,LinearScatteringCoef="0.451",LinearAbsorptionCoef="0.993",Radius="0.14")
12
13# Convert to Q space
14ConvertToDiffractionMDWorkspace(InputWorkspace=ws,OutputWorkspace=ws+'_MD2',LorentzCorrection='0',
15        OutputDimensions='Q (lab frame)', SplitInto='2',SplitThreshold='150')
16# Find peaks
17FindPeaksMD(InputWorkspace=ws+'_MD2',MaxPeaks='100',OutputWorkspace=ws+'_peaksLattice')
18# 3d integration to centroid peaks
19CentroidPeaksMD(InputWorkspace=ws+'_MD2',CoordinatesToUse='Q (lab frame)',
20        PeakRadius='0.12',PeaksWorkspace=ws+'_peaksLattice',OutputWorkspace=ws+'_peaksLattice')
21# Find the UB matrix using the peaks and known lattice parameters
22FindUBUsingLatticeParameters(PeaksWorkspace=ws+'_peaksLattice',a='10.3522',b='6.0768',c='4.7276',
23                alpha='90',beta='90',gamma='90', NumInitial='20', Tolerance='0.12')
24# And index to HKL           
25IndexPeaks(PeaksWorkspace=ws+'_peaksLattice', Tolerance='0.12')
26# Integrate peaks in Q space using spheres
27IntegratePeaksMD(InputWorkspace=ws+'_MD2',PeakRadius='0.12',
28        BackgroundOuterRadius='0.18',BackgroundInnerRadius='0.15',
29        PeaksWorkspace=ws+'_peaksLattice',OutputWorkspace=ws+'_peaksNoEdge',IntegrateIfOnEdge=False)
30IntegratePeaksMD(InputWorkspace=ws+'_MD2',PeakRadius='0.12',
31        BackgroundOuterRadius='0.18',BackgroundInnerRadius='0.15',
32        PeaksWorkspace=ws+'_peaksLattice',OutputWorkspace=ws+'_peaksEdge')