Changeset 663 for trunk/GSASIImath.py


Ignore:
Timestamp:
Jun 30, 2012 12:01:02 PM (10 years ago)
Author:
vondreele
Message:

fix too close peak rejection

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIImath.py

    r661 r663  
    766766        return True
    767767       
    768     def noDuplicate(xyz,peaks,incre):
    769         if True in [np.allclose(xyz*incre,peak*incre,atol=2.0) for peak in peaks]:
     768    def noDuplicate(xyz,peaks,Amat):
     769        if True in [np.allclose(np.inner(Amat,xyz),np.inner(Amat,peak),atol=1.0) for peak in peaks]:
     770            print ' Peak',xyz,' <1A from another peak'
    770771            return False
    771772        return True
     
    811812    phaseName = generalData['Name']
    812813    SGData = generalData['SGData']
    813     cell = generalData['Cell'][1:8]       
    814     A = G2lat.cell2A(cell[:6])
     814    Amat,Bmat = G2lat.cell2AB(generalData['Cell'][1:7])
     815#    cell = generalData['Cell'][1:8]       
     816#    A = G2lat.cell2A(cell[:6])
    815817    drawingData = data['Drawing']
    816818    peaks = []
     
    851853        else:
    852854            if keepDup:
    853                 if noDuplicate(peak,peaks,incre):
     855                if noDuplicate(peak,peaks,Amat):
    854856                    peaks.append(peak)
    855857                    mags.append(x1[0])
Note: See TracChangeset for help on using the changeset viewer.