Changeset 1146
- Timestamp:
- Nov 16, 2013 8:13:44 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIImath.py
r1142 r1146 1553 1553 dH = H-hkl 1554 1554 dang = ang-ang0 1555 if np.any(np.abs(dH)- Hmax > 0): #keep low order DHs1555 if np.any(np.abs(dH)- Hmax > 0): #keep low order DHs 1556 1556 continue 1557 1557 DH.append(dH) … … 1643 1643 CEsig = np.std(CErho) 1644 1644 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. adjustible1645 CFrho = np.where(np.real(CErho) <= flipData['k-Max']*CEsig,CFrho,-CFrho) #solves U atom problem! 1646 1646 CFhkl = fft.ifftshift(fft.ifftn(CFrho)) 1647 1647 CFhkl = np.where(CFhkl,CFhkl,1.0) #avoid divide by zero … … 1661 1661 CErho = np.real(fft.fftn(fft.fftshift(CEhkl))) 1662 1662 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! 1664 1664 1665 1665 mapData['Rcf'] = Rcf … … 1690 1690 norm = 1./(np.sqrt(3.)*np.sqrt(2.*np.pi)**3) 1691 1691 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 False1697 return True1698 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 # 1699 1699 def fixSpecialPos(xyz,SGData,Amat): 1700 1700 equivs = G2spc.GenAtom(xyz,SGData,Move=True) … … 1848 1848 1849 1849 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]: 1851 1851 return False 1852 1852 return True
Note: See TracChangeset
for help on using the changeset viewer.