Changeset 1308 for trunk/GSASIIstrMath.py
- Timestamp:
- Apr 30, 2014 11:01:48 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIstrMath.py
r1299 r1308 527 527 if parm in parmDict: 528 528 keys[key][iatm] = parmDict[parm] 529 Fdata = np.where(Fdata,Fdata,1.e-8) #avoid divide by zero in derivative calc.? 529 530 return Tdata,Mdata,Fdata,Xdata,dXdata,IAdata,Uisodata,Uijdata 530 531 … … 747 748 fbx = np.array([fot[:,np.newaxis]*cosp,-fot[:,np.newaxis]*cosp]) 748 749 #sum below is over Uniq 749 dfadfr = np.sum(fa/occ[:,np.newaxis],axis=2) 750 dfadfr = np.sum(fa/occ[:,np.newaxis],axis=2) #Fdata != 0 ever avoids /0. problem 750 751 dfadx = np.sum(twopi*Uniq*fax[:,:,:,np.newaxis],axis=2) 751 752 dfadui = np.sum(-SQfactor*fa,axis=2) … … 759 760 dFdbab[iref] = 2.*fas[0]*np.array([np.sum(dfadba*dBabdA),np.sum(-dfadba*parmDict[phfx+'BabA']*SQfactor*dBabdA)]).T 760 761 if not SGData['SGInv']: 761 dfbdfr = np.sum(fb/occ[:,np.newaxis],axis=2) # problem here if occ=0 for some atom762 dfbdx = np.sum(twopi*Uniq*fbx[:,:,:,np.newaxis],axis=2) 762 dfbdfr = np.sum(fb/occ[:,np.newaxis],axis=2) #Fdata != 0 ever avoids /0. problem 763 dfbdx = np.sum(twopi*Uniq*fbx[:,:,:,np.newaxis],axis=2) 763 764 dfbdui = np.sum(-SQfactor*fb,axis=2) 764 765 dfbdua = np.sum(-Hij*fb[:,:,:,np.newaxis],axis=2)
Note: See TracChangeset
for help on using the changeset viewer.