Changeset 4182 for trunk/GSASIImath.py


Ignore:
Timestamp:
Oct 18, 2019 3:01:27 PM (3 years ago)
Author:
vondreele
Message:

mag. str. fctr. changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIImath.py

    r4176 r4182  
    13781378    Sinv = np.vstack([Sinv for cen in SGData['SGCen']])
    13791379    SGT = np.vstack([SGT+cen for cen in SSGData['SSGCen']])%1.
     1380    if SGData['SGGray']:
     1381        SGMT = np.vstack((SGMT,SGMT))
     1382        Sinv =np.vstack((Sinv,Sinv))
     1383        SGT = np.vstack((SGT,SGT+.5))%1.
    13801384    detSM = nl.det(SGMT)
    13811385    mst = Sinv[:,3,:3]
     
    13901394    MmodA = np.sum(Am[nxs,nxs,:,:,:]*pcos[:,:,:,nxs,nxs],axis=3)    #cos term
    13911395    MmodB = np.sum(Bm[nxs,nxs,:,:,:]*psin[:,:,:,nxs,nxs],axis=3)    #sin term
    1392     if SGData['SGGray']:
    1393         MmodA = -np.sum(SGMT[nxs,:,nxs,:,:]*MmodA[:,:,:,nxs,:],axis=-1)*detSM[nxs,:,nxs,nxs]
    1394         MmodB = -np.sum(SGMT[nxs,:,nxs,:,:]*MmodB[:,:,:,nxs,:],axis=-1)*detSM[nxs,:,nxs,nxs]
    1395     else:
    1396         MmodA = np.sum(SGMT[nxs,:,nxs,:,:]*MmodA[:,:,:,nxs,:],axis=-1)*SGData['MagMom'][nxs,:,nxs,nxs]
    1397         MmodB = np.sum(SGMT[nxs,:,nxs,:,:]*MmodB[:,:,:,nxs,:],axis=-1)*SGData['MagMom'][nxs,:,nxs,nxs]
     1396#    if SGData['SGGray']:
     1397#        MmodA = -np.sum(SGMT[nxs,:,nxs,:,:]*MmodA[:,:,:,nxs,:],axis=-1)*detSM[nxs,:,nxs,nxs]
     1398#        MmodB = -np.sum(SGMT[nxs,:,nxs,:,:]*MmodB[:,:,:,nxs,:],axis=-1)*detSM[nxs,:,nxs,nxs]
     1399#    else:
     1400    MmodA = np.sum(SGMT[nxs,:,nxs,:,:]*MmodA[:,:,:,nxs,:],axis=-1)*SGData['MagMom'][nxs,:,nxs,nxs]
     1401    MmodB = np.sum(SGMT[nxs,:,nxs,:,:]*MmodB[:,:,:,nxs,:],axis=-1)*SGData['MagMom'][nxs,:,nxs,nxs]
    13981402    return MmodB,MmodA    #Ntau,Nops,Natm,,Mxyz; cos & sin parts; sum matches drawn atom moments
    13991403       
Note: See TracChangeset for help on using the changeset viewer.