Changeset 1008


Ignore:
Timestamp:
Jul 24, 2013 1:42:33 PM (8 years ago)
Author:
vondreele
Message:

make Auto peak search eliminate duplicates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpwdGUI.py

    r997 r1008  
    100100        mags = ymask[indx]
    101101        poss = x[indx]
    102         for pos,mag in zip(poss,mags):
     102        refs = zip(poss,mags)
     103        refs = G2mth.sortArray(refs,0,reverse=True)
     104        for i,ref1 in enumerate(refs):
     105            for ref2 in refs[i+1:]:
     106                if abs(ref2[0]-ref1[0]) < 0.1*G2pwd.getFWHM(ref1[0],inst):
     107                    del(refs[i])   
     108        refs = G2mth.sortArray(refs,1,reverse=True)
     109        for pos,mag in refs:
    103110            data.append(G2mth.setPeakparms(inst,inst2,pos,mag))
    104111        UpdatePeakGrid(G2frame,data)
Note: See TracChangeset for help on using the changeset viewer.