Changeset 2005
- Timestamp:
- Oct 14, 2015 2:59:50 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIImath.py
r2004 r2005 1008 1008 deltx = 0.00001 1009 1009 deltf = 0.0001 1010 deltu = 0.0000 011010 deltu = 0.00001 1011 1011 for i in range(Mx[1]): #atoms 1012 1012 for j in range(Mx[2]): #waves … … 1019 1019 dGdMxC[:,:,j,k] += (Cap-Cam)/(2*deltx) 1020 1020 dGdMxS[:,:,j,k] += (Sap-Sam)/(2*deltx) 1021 Ca0,Sa0 = np.squeeze(Modulation(waveTypes,np.array([H,]),FSSdata,XSSdata,USSdata,Mast)) 1022 for i in range(Mu[1]): #atoms 1023 for j in range(Mu[2]): #waves 1024 for k in range(Mu[3]): #coeff 1025 USSdata[k,j,i] += deltu 1026 Cap,Sap = np.squeeze(Modulation(waveTypes,np.array([H,]),FSSdata,XSSdata,USSdata,Mast)) 1027 USSdata[k,j,i] -= deltu 1028 dGdMuC[:,:,j,k] += (Cap-Ca0)/deltu 1029 dGdMuS[:,:,j,k] += (Sap-Sa0)/deltu 1030 # GSASIIpath.IPyBreak() 1021 1031 else: #analytic derivatives 1022 1032 glTau,glWt = pwd.pygauleg(0.,1.,32) #get Gauss-Legendre intervals & weights … … 1082 1092 dGdMxS = np.concatenate((dGdMxSa,dGdMxSb),axis=-1) 1083 1093 # ops x atoms x waves x xyz - imaginary part 1084 GSASIIpath.IPyBreak()1085 1094 return np.array([cosHA,sinHA]),[dGdMfC,dGdMfS],[dGdMxC,dGdMxS],[dGdMuC,dGdMuS] 1086 1095 -
trunk/GSASIIphsGUI.py
r1993 r2005 3242 3242 def DrawAtomsDeleteByIDs(IDs): 3243 3243 atomData = data['Drawing']['Atoms'] 3244 loc = data['Drawing']['atomPtrs'][3]+8 3244 cx,ct,cs,ci = data['General']['AtomPtrs'] 3245 loc = ci+8 3245 3246 indx = G2mth.FindAtomIndexByIDs(atomData,loc,IDs) 3246 3247 indx.reverse() -
trunk/GSASIIstrMath.py
r2004 r2005 916 916 2.*fbs[0]*np.array([np.sum(dfbdba*dBabdA),np.sum(-dfbdba*parmDict[phfx+'BabA']*SQfactor*dBabdA)]).T 917 917 # GSASIIpath.IPyBreak() 918 print ' derivative time %.4f\r'%(time.time()-time0) 918 if not iref%100 : 919 print ' %d derivative time %.4f\r'%(iref,time.time()-time0), 919 920 #loop over atoms - each dict entry is list of derivatives for all the reflections 920 921 if nTwin > 1: … … 1274 1275 2.*fbs[0]*np.array([np.sum(dfbdba*dBabdA),np.sum(-dfbdba*parmDict[phfx+'BabA']*SQfactor*dBabdA)]).T 1275 1276 #loop over atoms - each dict entry is list of derivatives for all the reflections 1277 if not iref%100 : 1278 print ' %d derivative time %.4f\r'%(iref,time.time()-time0), 1276 1279 for i in range(len(Mdata)): #loop over atoms 1277 1280 dFdvDict[pfx+'Afrac:'+str(i)] = dFdfr.T[i]
Note: See TracChangeset
for help on using the changeset viewer.