Changeset 2005


Ignore:
Timestamp:
Oct 14, 2015 2:59:50 PM (6 years ago)
Author:
vondreele
Message:

add print every 100 refl. in structurefactorderv routines
fix atom loc problem

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIImath.py

    r2004 r2005  
    10081008        deltx = 0.00001
    10091009        deltf = 0.0001
    1010         deltu = 0.000001
     1010        deltu = 0.00001
    10111011        for i in range(Mx[1]):  #atoms
    10121012            for j in range(Mx[2]):  #waves
     
    10191019                    dGdMxC[:,:,j,k] += (Cap-Cam)/(2*deltx)
    10201020                    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()
    10211031    else:   #analytic derivatives                 
    10221032        glTau,glWt = pwd.pygauleg(0.,1.,32)         #get Gauss-Legendre intervals & weights
     
    10821092        dGdMxS = np.concatenate((dGdMxSa,dGdMxSb),axis=-1)
    10831093# ops x atoms x waves x xyz - imaginary part
    1084     GSASIIpath.IPyBreak()
    10851094    return np.array([cosHA,sinHA]),[dGdMfC,dGdMfS],[dGdMxC,dGdMxS],[dGdMuC,dGdMuS]
    10861095   
  • trunk/GSASIIphsGUI.py

    r1993 r2005  
    32423242    def DrawAtomsDeleteByIDs(IDs):
    32433243        atomData = data['Drawing']['Atoms']
    3244         loc = data['Drawing']['atomPtrs'][3]+8
     3244        cx,ct,cs,ci = data['General']['AtomPtrs']
     3245        loc = ci+8
    32453246        indx = G2mth.FindAtomIndexByIDs(atomData,loc,IDs)
    32463247        indx.reverse()
  • trunk/GSASIIstrMath.py

    r2004 r2005  
    916916            2.*fbs[0]*np.array([np.sum(dfbdba*dBabdA),np.sum(-dfbdba*parmDict[phfx+'BabA']*SQfactor*dBabdA)]).T
    917917#        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),
    919920        #loop over atoms - each dict entry is list of derivatives for all the reflections
    920921    if nTwin > 1:
     
    12741275            2.*fbs[0]*np.array([np.sum(dfbdba*dBabdA),np.sum(-dfbdba*parmDict[phfx+'BabA']*SQfactor*dBabdA)]).T
    12751276        #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),
    12761279    for i in range(len(Mdata)):     #loop over atoms 
    12771280        dFdvDict[pfx+'Afrac:'+str(i)] = dFdfr.T[i]
Note: See TracChangeset for help on using the changeset viewer.