Ticket #9194: NaCl_updated.py

File NaCl_updated.py, 1.2 KB (added by Owen Arnold, 7 years ago)
Line 
1
2
3#
4# Exclude the monitors when loading the raw SXD file.  This avoids
5#
6SXD23767=Load(Filename='SXD23767.raw',LoadMonitors='Exclude')
7
8#
9# A lower SplitThreshold, with a reasonable bound on the recursion depth, helps find weaker peaks at higher Q.
10#
11#QLab = ConvertToMD(InputWorkspace=SXD23767,OutputWorkspace='QLab',QDimensions='Q3D',dEAnalysisMode='Elastic',MinValues='-15,-15,-15',MaxValues='15,15,15',SplitThreshold='50',MaxRecursionDepth='13')
12QLab = ConvertToDiffractionMDWorkspace(InputWorkspace=SXD23767, OutputDimensions='Q (lab frame)', SplitThreshold=50, LorentzCorrection='1',MaxRecursionDepth='13',Extents='-15,15,-15,15,-15,15')
13#
14#  NaCl has a relatively small unit cell, so the distance between peaks is relatively large.  Setting the PeakDistanceThreshold
15#  higher avoids finding high count regions on the sides of strong peaks as separate peaks.
16#
17peaks_qLab = FindPeaksMD(InputWorkspace='QLab', MaxPeaks=300, DensityThresholdFactor=10,PeakDistanceThreshold=1.0)
18
19binned = BinMD(InputWorkspace=QLab,AlignedDim0='Q_lab_x,-10,10,300',AlignedDim1='Q_lab_y,-10,10,300',AlignedDim2='Q_lab_z,-10,10,300')
20
21clusters = IntegratePeaksUsingClusters(InputWorkspace=binned, PeaksWorkspace=peaks_qLab, Threshold=10000)