Changeset 4055


Ignore:
Timestamp:
Jul 7, 2019 5:14:44 PM (2 years ago)
Author:
vondreele
Message:

minor changes to incomm. mag. srt. fctr. stuff. Still wrong.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIImath.py

    r4054 r4055  
    14161416    if SGData['SGInv']:
    14171417        SGMT = np.vstack((SGMT,-SGMT))
    1418         Sinv =np.vstack((Sinv,-Sinv))
     1418        Sinv = np.vstack((Sinv,-Sinv))
    14191419        SGT = np.vstack((SGT,-SGT))
    14201420    SGMT = np.vstack([SGMT for cen in SGData['SGCen']])     #Nops,3,3
    14211421    Sinv = np.vstack([Sinv for cen in SGData['SGCen']])     #Nops,4,4
    14221422    SGT = np.vstack([SGT+cen for cen in SSGData['SSGCen']])%1.
    1423     detSM = nl.det(SGMT)            #Nops
    14241423    epsinv = Sinv[:,3,3]            #Nops
    14251424    kdr = np.inner(XYZ,modQ).T      #Nops,Natm
    1426     phase = kdr+(epsinv*(np.inner(modQ,SGT[:,:3])-SGT[:,3]))[:,nxs]     #Nops,Natm
     1425    phase = kdr+(epsinv*(np.inner(SGT[:,:3],modQ)-SGT[:,3]))[:,nxs]     #Nops,Natm
    14271426   
    14281427    psin = np.sin(twopi*phase)      #Nops,Natm
     
    14301429    MmodB = np.sum(Bm[nxs,:,:,:]*pcos[:,:,nxs,nxs],axis=2)      #Nops,Natm,3
    14311430    MmodA = np.sum(Am[nxs,:,:,:]*psin[:,:,nxs,nxs],axis=2)
    1432 #    if SGData['SGGray']:
    1433 #        MmodA = -np.sum(SGMT[:,nxs,:,:]*MmodA[:,:,nxs,:],axis=-1)*detSM[:,nxs,nxs]*SGData['SpnFlp'][:,nxs,nxs]
    1434 #        MmodB = -np.sum(SGMT[:,nxs,:,:]*MmodB[:,:,nxs,:],axis=-1)*detSM[:,nxs,nxs]*SGData['SpnFlp'][:,nxs,nxs]
    1435 #    else:
    14361431    MmodA = np.sum(SGMT[:,nxs,:,:]*MmodA[:,:,nxs,:],axis=-1)*SGData['MagMom'][:,nxs,nxs]
    14371432    MmodB = np.sum(SGMT[:,nxs,:,:]*MmodB[:,:,nxs,:],axis=-1)*SGData['MagMom'][:,nxs,nxs]
    1438     Mmod = MmodA+MmodB
    1439     return Mmod,MmodA,MmodB    #Nops,Natm,,Mxyz; sum,sin & cos parts
     1433    return MmodA,MmodB    #Nops,Natm,,Mxyz; sin & cos parts
    14401434       
    14411435def Modulation(H,HP,nWaves,Fmod,Xmod,Umod,glTau,glWt):
  • trunk/GSASIIstrMath.py

    r4054 r4055  
    15101510       
    15111511        mXYZ = np.array([[xyz[0] for xyz in list(G2spc.GenAtom(xyz,SGData,All=True,Move=True))] for xyz in (Xdata+dXdata).T])%1. #Natn,Nop,xyz
    1512         Tmag,TmagA,TmagB = G2mth.MagMod2(mXYZ,modQ,MSSdata,SGData,SSGData)   #Nops,Natm,Mxyz-Tmag matches drawing moments
     1512        TmagA,TmagB = G2mth.MagMod2(mXYZ,modQ,MSSdata,SGData,SSGData)   #Nops,Natm,Mxyz-Tmag matches drawing moments
    15131513       
    15141514        if not SGData['SGGray']:    #for fixed Mx,My,Mz
     
    16141614            fam = TMcorr[:,nxs,:,nxs]*np.array([np.where(M[i]>=0,(TmagB*cosm[i,:,:,nxs]-    \
    16151615                np.sign(H[3,i])*TmagA*sinm[i,:,:,nxs]),0.) for i in range(mRef)])
     1616           
    16161617            fbm = TMcorr[:,nxs,:,nxs]*np.array([np.where(M[i]>=0,(TmagB*sinm[i,:,:,nxs]+    \
    16171618                np.sign(H[3,i])*TmagA*cosm[i,:,:,nxs]),0.) for i in range(mRef)])
Note: See TracChangeset for help on using the changeset viewer.