1 | # Basic parameters for Triphylite Crystal |
---|
2 | #Name of the workspaces to create |
---|
3 | ws = "TOPAZ_3132" |
---|
4 | filename = ws+"_event.nxs" |
---|
5 | LoadEventNexus(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 |
---|
11 | AnvredCorrection(InputWorkspace=ws,OutputWorkspace=ws,LinearScatteringCoef="0.451",LinearAbsorptionCoef="0.993",Radius="0.14") |
---|
12 | |
---|
13 | # Convert to Q space |
---|
14 | ConvertToDiffractionMDWorkspace(InputWorkspace=ws,OutputWorkspace=ws+'_MD2',LorentzCorrection='0', |
---|
15 | OutputDimensions='Q (lab frame)', SplitInto='2',SplitThreshold='150') |
---|
16 | # Find peaks |
---|
17 | FindPeaksMD(InputWorkspace=ws+'_MD2',MaxPeaks='100',OutputWorkspace=ws+'_peaksLattice') |
---|
18 | # 3d integration to centroid peaks |
---|
19 | CentroidPeaksMD(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 |
---|
22 | FindUBUsingLatticeParameters(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 |
---|
25 | IndexPeaks(PeaksWorkspace=ws+'_peaksLattice', Tolerance='0.12') |
---|
26 | # Integrate peaks in Q space using spheres |
---|
27 | IntegratePeaksMD(InputWorkspace=ws+'_MD2',PeakRadius='0.12', |
---|
28 | BackgroundOuterRadius='0.18',BackgroundInnerRadius='0.15', |
---|
29 | PeaksWorkspace=ws+'_peaksLattice',OutputWorkspace=ws+'_peaksNoEdge',IntegrateIfOnEdge=False) |
---|
30 | IntegratePeaksMD(InputWorkspace=ws+'_MD2',PeakRadius='0.12', |
---|
31 | BackgroundOuterRadius='0.18',BackgroundInnerRadius='0.15', |
---|
32 | PeaksWorkspace=ws+'_peaksLattice',OutputWorkspace=ws+'_peaksEdge') |
---|