Changeset 1765


Ignore:
Timestamp:
Mar 26, 2015 1:19:41 PM (7 years ago)
Author:
vondreele
Message:

fixes to peak indexing stuff

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpwdGUI.py

    r1759 r1765  
    24182418        spc = controls[13]
    24192419        SGData = G2spc.SpcGroup(spc)[1]
    2420 #        if 'C' in Inst['Type'][0]:
    2421 #            dmin = G2lat.Pos2dsp(Inst,limits[1])
    2422 #        else:   #TOF - use other limit!
    2423 #            dmin = G2lat.Pos2dsp(Inst,limits[0])
     2420        if 'C' in Inst['Type'][0]:
     2421            dmin = G2lat.Pos2dsp(Inst,limits[1])
     2422        else:   #TOF - use other limit!
     2423            dmin = G2lat.Pos2dsp(Inst,limits[0])
    24242424        if ssopt.get('Use',False):
    24252425            dmin = peaks[0][-1][8]
     
    24312431            M20,X20 = G2indx.calc_M20SS(peaks[0],G2frame.HKL)
    24322432        else:
    2433             dmin = peaks[0][-1][7]
    2434             G2frame.HKL = G2pwd.getHKLpeak(dmin,SGData,A,Inst)
    2435             peaks = [G2indx.IndexPeaks(peaks[0],G2frame.HKL)[1],peaks[1]]   #keep esds from peak fit
    2436             M20,X20 = G2indx.calc_M20(peaks[0],G2frame.HKL)
    2437         print ' new M20,X20: %.2f %d fraction found: %.3f'%(M20,X20,float(len(peaks[0]))/len(G2frame.HKL))
     2433            if len(peaks[0]):
     2434                dmin = peaks[0][-1][7]
     2435                G2frame.HKL = G2pwd.getHKLpeak(dmin,SGData,A,Inst)
     2436                peaks = [G2indx.IndexPeaks(peaks[0],G2frame.HKL)[1],peaks[1]]   #keep esds from peak fit
     2437                M20,X20 = G2indx.calc_M20(peaks[0],G2frame.HKL)
     2438            else:
     2439                M20 = X20 = 0.
     2440                G2frame.HKL = G2pwd.getHKLpeak(dmin,SGData,A,Inst)
     2441        if len(G2frame.HKL):
     2442            print ' new M20,X20: %.2f %d fraction found: %.3f'%(M20,X20,float(len(peaks[0]))/len(G2frame.HKL))
    24382443        G2frame.PatternTree.SetItemPyData(G2gd.GetPatternTreeItemId(G2frame,PatternId, 'Index Peak List'),peaks)
    24392444        if 'PKS' in G2frame.PatternTree.GetItemText(G2frame.PatternId):
Note: See TracChangeset for help on using the changeset viewer.