Changeset 1146


Ignore:
Timestamp:
Nov 16, 2013 8:13:44 AM (8 years ago)
Author:
vondreele
Message:

small mods

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIImath.py

    r1142 r1146  
    15531553            dH = H-hkl
    15541554            dang = ang-ang0
    1555             if np.any(np.abs(dH)-Hmax > 0):    #keep low order DHs
     1555            if np.any(np.abs(dH)- Hmax > 0):    #keep low order DHs
    15561556                continue
    15571557            DH.append(dH)
     
    16431643        CEsig = np.std(CErho)
    16441644        CFrho = np.where(np.real(CErho) >= flipData['k-factor']*CEsig,CErho,-CErho)
    1645         CFrho = np.where(np.real(CErho) <= flipData['k-Max']*CEsig,CFrho,-CFrho)      #solves U atom problem! make 20. adjustible
     1645        CFrho = np.where(np.real(CErho) <= flipData['k-Max']*CEsig,CFrho,-CFrho)      #solves U atom problem!
    16461646        CFhkl = fft.ifftshift(fft.ifftn(CFrho))
    16471647        CFhkl = np.where(CFhkl,CFhkl,1.0)           #avoid divide by zero
     
    16611661    CErho = np.real(fft.fftn(fft.fftshift(CEhkl)))
    16621662    print ' No.cycles = ',Ncyc,'Residual Rcf =%8.3f%s'%(Rcf,'%')+' Map size:',CErho.shape
    1663     roll = findOffset(SGData,A,CEhkl)
     1663    roll = findOffset(SGData,A,CEhkl)               #CEhkl needs to be just the observed set, not the full set!
    16641664       
    16651665    mapData['Rcf'] = Rcf
     
    16901690    norm = 1./(np.sqrt(3.)*np.sqrt(2.*np.pi)**3)
    16911691   
    1692     def noDuplicate(xyz,peaks,Amat):
    1693         XYZ = np.inner(Amat,xyz)
    1694         if True in [np.allclose(XYZ,np.inner(Amat,peak),atol=0.5) for peak in peaks]:
    1695             print ' Peak',xyz,' <0.5A from another peak'
    1696             return False
    1697         return True
    1698                            
     1692#    def noDuplicate(xyz,peaks,Amat):
     1693#        XYZ = np.inner(Amat,xyz)
     1694#        if True in [np.allclose(XYZ,np.inner(Amat,peak),atol=0.5) for peak in peaks]:
     1695#            print ' Peak',xyz,' <0.5A from another peak'
     1696#            return False
     1697#        return True
     1698#                           
    16991699    def fixSpecialPos(xyz,SGData,Amat):
    17001700        equivs = G2spc.GenAtom(xyz,SGData,Move=True)
     
    18481848
    18491849    def noDuplicate(xyz,peaks,Amat):
    1850         if True in [np.allclose(np.inner(Amat,xyz),np.inner(Amat,peak),atol=0.5) for peak in peaks]:
     1850        if True in [np.allclose(np.inner(Amat,xyz),np.inner(Amat,peak),atol=1.0) for peak in peaks]:
    18511851            return False
    18521852        return True
Note: See TracChangeset for help on using the changeset viewer.