Changeset 4997 for trunk/GSASIImath.py


Ignore:
Timestamp:
Jul 16, 2021 9:21:10 AM (23 months ago)
Author:
vondreele
Message:

move imports to top of G2ctrlGUi code so debugger can find it
fix FillUnitCell? bug when incommensurate mag.
latest revision of incomm. mag. str. factor stuff

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIImath.py

    r4990 r4997  
    17511751    psin = np.sin(twopi*phase)
    17521752    pcos = np.cos(twopi*phase)
    1753     MmodA = Am[nxs,nxs,:,:]*pcos[:,:,:,nxs]    #cos term
    1754     MmodB = Bm[nxs,nxs,:,:]*psin[:,:,:,nxs]    #sin term
    1755     MmodA = np.sum(SGMT[nxs,:,nxs,:,:]*MmodA[:,:,:,nxs,:],axis=-1)*SGData['SpnFlp'][nxs,:,nxs,nxs]
    1756     MmodB = np.sum(SGMT[nxs,:,nxs,:,:]*MmodB[:,:,:,nxs,:],axis=-1)*SGData['SpnFlp'][nxs,:,nxs,nxs]
    1757     return MmodA,MmodB    #Ntau,Nops,Natm,Mxyz; cos & sin parts; sum matches drawn atom moments
     1753    MmodAR = Am[nxs,nxs,:,:]*pcos[:,:,:,nxs]    #cos term
     1754    MmodBR = Bm[nxs,nxs,:,:]*psin[:,:,:,nxs]    #sin term
     1755    MmodAR = np.sum(SGMT[nxs,:,nxs,:,:]*MmodAR[:,:,:,nxs,:],axis=-1)
     1756    MmodBR = np.sum(SGMT[nxs,:,nxs,:,:]*MmodBR[:,:,:,nxs,:],axis=-1)
     1757    MmodAI = Am[nxs,nxs,:,:]*psin[:,:,:,nxs]    #cos term
     1758    MmodBI = Bm[nxs,nxs,:,:]*pcos[:,:,:,nxs]    #sin term
     1759    MmodAI = np.sum(SGMT[nxs,:,nxs,:,:]*MmodAI[:,:,:,nxs,:],axis=-1)
     1760    MmodBI = np.sum(SGMT[nxs,:,nxs,:,:]*MmodBI[:,:,:,nxs,:],axis=-1)
     1761    return MmodAR,MmodBR,MmodAI,MmodBI    #Ntau,Nops,Natm,Mxyz; cos & sin parts; sum matches drawn atom moments
    17581762       
    17591763def Modulation(H,HP,nWaves,Fmod,Xmod,Umod,glTau,glWt):
Note: See TracChangeset for help on using the changeset viewer.