コード例 #1
0
def Find_Peaks(rnum, long_cell, threshold, MaxPeaks, centroid_radius, edge_pixel):
    mantid.PeakDistanceThreshold = 0.9 * 3.14 / long_cell
    mantid.FindPeaksMD(InputWorkspace='WISH000' + str(rnum) + '_MD', PeakDistanceThreshold=PeakDistanceThreshold,
                       MaxPeaks=MaxPeaks, DensityThresholdFactor=threshold,
                       OutputWorkspace='WISH000' + str(rnum) + '_find_peaks', EdgePixels=edge_pixel)
    mantid.CentroidPeaksMD(InputWorkspace='WISH000' + str(rnum) + '_MD', PeakRadius=centroid_radius,
                           PeaksWorkspace='WISH000' + str(rnum) + '_find_peaks',
                           OutputWorkspace='WISH000' + str(rnum) + '_find_peaks')
コード例 #2
0
                             LinearAbsorptionCoef=0.993,
                             Radius=0.14)

# Convert to Q space
LabQ = mantid.ConvertToDiffractionMDWorkspace(InputWorkspace=ws,
                                              LorentzCorrection='0',
                                              OutputDimensions='Q (lab frame)',
                                              SplitInto=2,
                                              SplitThreshold=150)

# Find peaks
PeaksLattice = mantid.FindPeaksMD(InputWorkspace=LabQ, MaxPeaks=100)

# 3d integration to centroid peaks
PeaksLattice = mantid.CentroidPeaksMD(InputWorkspace=LabQ,
                                      PeakRadius=0.12,
                                      PeaksWorkspace=PeaksLattice)

# Find the UB matrix using the peaks and known lattice parameters
mantid.FindUBUsingLatticeParameters(PeaksWorkspace=PeaksLattice,
                                    a=10.3522,
                                    b=6.0768,
                                    c=4.7276,
                                    alpha=90,
                                    beta=90,
                                    gamma=90,
                                    NumInitial=20,
                                    Tolerance=0.12)

# And index to HKL
mantid.IndexPeaks(PeaksWorkspace=PeaksLattice, Tolerance=0.12)