Changeset 1682 for trunk/GSASIIstrMath.py
- Timestamp:
- Feb 28, 2015 9:16:41 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIstrMath.py
r1676 r1682 1772 1772 sumFosq = 0.0 1773 1773 sumdFsq = 0.0 1774 sumInt = 0.0 1774 1775 for refl in refDict['RefList']: 1775 1776 if 'C' in calcControls[hfx+'histType']: … … 1785 1786 elif iBeg < iFin: 1786 1787 yp[iBeg:iFin] = refl[11+im]*refl[9+im]*G2pwd.getFCJVoigt3(refl[5+im],refl[6+im],refl[7+im],shl,ma.getdata(x[iBeg:iFin])) #>90% of time spent here 1788 sumInt += refl[11+im]*refl[9+im] 1787 1789 if Ka2: 1788 1790 pos2 = refl[5+im]+lamRatio*tand(refl[5+im]/2.0) # + 360/pi * Dlam/lam * tan(th) … … 1791 1793 iFin2 = min(np.searchsorted(x,pos2+fmax),xF) 1792 1794 yp[iBeg2:iFin2] += refl[11+im]*refl[9+im]*kRatio*G2pwd.getFCJVoigt3(pos2,refl[6+im],refl[7+im],shl,ma.getdata(x[iBeg2:iFin2])) #and here 1795 sumInt += refl[11+im]*refl[9+im]*kRatio 1793 1796 refl[8+im] = np.sum(np.where(ratio[iBeg:iFin2]>0.,yp[iBeg:iFin2]*ratio[iBeg:iFin2]/(refl[11+im]*(1.+kRatio)),0.0)) 1797 1794 1798 elif 'T' in calcControls[hfx+'histType']: 1795 1799 yp = np.zeros_like(yb) … … 1800 1804 yp[iBeg:iFin] = refl[11+im]*refl[9+im]*G2pwd.getEpsVoigt(refl[5+im],refl[12+im],refl[13+im],refl[6+im],refl[7+im],ma.getdata(x[iBeg:iFin])) #>90% of time spent here 1801 1805 refl[8+im] = np.sum(np.where(ratio[iBeg:iFin]>0.,yp[iBeg:iFin]*ratio[iBeg:iFin]/refl[11+im],0.0)) 1806 sumInt += refl[11+im]*refl[9+im] 1802 1807 Fo = np.sqrt(np.abs(refl[8+im])) 1803 1808 Fc = np.sqrt(np.abs(refl[9]+im)) … … 1812 1817 Histogram['Residuals'][phfx+'Rf'] = 100. 1813 1818 Histogram['Residuals'][phfx+'Rf^2'] = 100. 1819 Histogram['Residuals'][phfx+'sumInt'] = sumInt 1814 1820 Histogram['Residuals'][phfx+'Nref'] = len(refDict['RefList']) 1815 1821 Histogram['Residuals']['hId'] = hId … … 1852 1858 hfx = ':%d:'%(hId) 1853 1859 bakType = calcControls[hfx+'bakType'] 1854 yb = G2pwd.getBackground(hfx,parmDict,bakType,calcControls[hfx+'histType'],x)1860 yb,Histogram['sumBk'] = G2pwd.getBackground(hfx,parmDict,bakType,calcControls[hfx+'histType'],x) 1855 1861 yc = np.zeros_like(yb) 1856 1862 cw = np.diff(x)
Note: See TracChangeset
for help on using the changeset viewer.