Ignore:
Timestamp:
Apr 8, 2019 8:44:53 AM (3 years ago)
Author:
vondreele
Message:

mag str fctr. stuff

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIstrMath.py

    r3877 r3880  
    15131513       
    15141514        if not SGData['SGGray']:
     1515            Mmod += Gdata.T[:,nxs,:]
    15151516            GSdata = np.inner(Gdata.T,np.swapaxes(SGMT,1,2))  #apply sym. ops.--> Natm,Nops,Nxyz
    15161517            if SGData['SGInv'] and not SGData['SGFixed']:   #inversion if any
     
    15901591
    15911592        if 'N' in calcControls[hfx+'histType'] and parmDict[pfx+'isMag']:       #TODO: mag math here??
    1592             GmfpuA = G2mth.MagModulation(Uniq,UniqP,nWaves,Fmod,Xmod,Umod,Mmod,glTau,glWt) #2 x refBlk x sym X atoms
     1593            UniqM = np.hstack([Uniq for cen in SSCen])
     1594            UniqPM = np.hstack([UniqP for cen in SSCen])
     1595            GmfpuA = G2mth.MagModulation(UniqM,UniqPM,nWaves,Fmod,Xmod,Umod,Mmod,glTau,glWt) #2 x refBlk x sym X atoms
    15931596           
    15941597           
     
    16421645#            Q = HM.T[:,nxs,nxs,nxs,:]*eDotK[:,:,:,:,nxs]-Kmag[nxs,:,:,:,:] #Nref,Ntau,Nop,Natm,Mxyz
    16431646#
    1644             fam = (Q*TMcorr[:,nxs,nxs,:,nxs]*cosm[:,nxs,:,:,nxs]*Smag[nxs,:,:,:,nxs])   #Nref,Ntau,Nop,Natm,Mxyz
    1645             fbm = (Q*TMcorr[:,nxs,nxs,:,nxs]*sinm[:,nxs,:,:,nxs]*Smag[nxs,:,:,:,nxs])
     1647            fam = (TMcorr[:,nxs,:,nxs]*cosp[:,:,:,nxs])   #Nref,Nop,Natm,Mxyz
     1648            fbm = (TMcorr[:,nxs,nxs,:,nxs]*sinp[:,nxs,:,:,nxs])
     1649            fagm = fam*GmfpuA[0]-fbm*GmfpuA[1]   #real; Nref,Nop,Natm,Mxyz
     1650            fbgm = fbm*GmfpuA[0]+fam*GmfpuA[1]
     1651            fasm = np.sum(np.sum(fagm,axis=1),axis=1)   #Nref,,Mxyz     sum Nop,Natm
     1652            fbsm = np.sum(np.sum(fbgm,axis=1),axis=1)
    16461653#           
    16471654#            fams = np.sqrt(np.sum(fam**2,axis=-1))
Note: See TracChangeset for help on using the changeset viewer.