Changeset 1498 for trunk/GSASIIstrMath.py
 Timestamp:
 Sep 16, 2014 4:20:57 PM (7 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/GSASIIstrMath.py
r1496 r1498 1531 1531 iFin = max(xB,min(np.searchsorted(x,refl[5]+fmax),xF)) 1532 1532 iFin2 = iFin 1533 yp[iBeg:iFin] = refl[11]*refl[9]*G2pwd.getFCJVoigt3(refl[5],refl[6],refl[7],shl,ma.getdata(x[iBeg:iFin])) #>90% of time spent here 1534 if Ka2: 1535 pos2 = refl[5]+lamRatio*tand(refl[5]/2.0) # + 360/pi * Dlam/lam * tan(th) 1536 Wd,fmin,fmax = G2pwd.getWidthsCW(pos2,refl[6],refl[7],shl) 1537 iBeg2 = max(xB,np.searchsorted(x,pos2fmin)) 1538 iFin2 = min(np.searchsorted(x,pos2+fmax),xF) 1539 if not iBeg2+iFin2: #peak below low limit  skip peak 1540 continue 1541 elif not iBeg2iFin2: #peak above high limit  done 1542 break 1543 yp[iBeg2:iFin2] += refl[11]*refl[9]*kRatio*G2pwd.getFCJVoigt3(pos2,refl[6],refl[7],shl,ma.getdata(x[iBeg2:iFin2])) #and here 1544 refl[8] = np.sum(np.where(ratio[iBeg:iFin2]>0.,yp[iBeg:iFin2]*ratio[iBeg:iFin2]/(refl[11]*(1.+kRatio)),0.0)) 1533 if not iBeg+iFin: #peak below low limit  skip peak 1534 continue 1535 elif not iBegiFin: #peak above high limit  done 1536 break 1537 elif iBeg < iFin: 1538 yp[iBeg:iFin] = refl[11]*refl[9]*G2pwd.getFCJVoigt3(refl[5],refl[6],refl[7],shl,ma.getdata(x[iBeg:iFin])) #>90% of time spent here 1539 if Ka2: 1540 pos2 = refl[5]+lamRatio*tand(refl[5]/2.0) # + 360/pi * Dlam/lam * tan(th) 1541 Wd,fmin,fmax = G2pwd.getWidthsCW(pos2,refl[6],refl[7],shl) 1542 iBeg2 = max(xB,np.searchsorted(x,pos2fmin)) 1543 iFin2 = min(np.searchsorted(x,pos2+fmax),xF) 1544 yp[iBeg2:iFin2] += refl[11]*refl[9]*kRatio*G2pwd.getFCJVoigt3(pos2,refl[6],refl[7],shl,ma.getdata(x[iBeg2:iFin2])) #and here 1545 refl[8] = np.sum(np.where(ratio[iBeg:iFin2]>0.,yp[iBeg:iFin2]*ratio[iBeg:iFin2]/(refl[11]*(1.+kRatio)),0.0)) 1545 1546 elif 'T' in calcControls[hfx+'histType']: 1546 1547 yp = np.zeros_like(yb)
Note: See TracChangeset
for help on using the changeset viewer.