Changeset 4057


Ignore:
Timestamp:
Jul 11, 2019 1:03:41 PM (2 years ago)
Author:
vondreele
Message:

tweaks of the mag. str. fctr. code

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIImath.py

    r4055 r4057  
    14061406    this needs to make magnetic moment modulations & magnitudes
    14071407    '''
    1408     Am = np.array(MSSdata[:3]).T   #atoms x waves x sin pos mods
    1409     Bm = np.array(MSSdata[3:]).T  #...cos pos mods
     1408    Am = np.array(MSSdata[:3]).T   #atoms x waves x sin mag mods
     1409    Bm = np.array(MSSdata[3:]).T  #...cos mag mods
    14101410    nWaves = Am.shape[1]
    14111411    if not nWaves:
     
    14271427    psin = np.sin(twopi*phase)      #Nops,Natm
    14281428    pcos = np.cos(twopi*phase)
    1429     MmodB = np.sum(Bm[nxs,:,:,:]*pcos[:,:,nxs,nxs],axis=2)      #Nops,Natm,3
    1430     MmodA = np.sum(Am[nxs,:,:,:]*psin[:,:,nxs,nxs],axis=2)
    1431     MmodA = np.sum(SGMT[:,nxs,:,:]*MmodA[:,:,nxs,:],axis=-1)*SGData['MagMom'][:,nxs,nxs]
    1432     MmodB = np.sum(SGMT[:,nxs,:,:]*MmodB[:,:,nxs,:],axis=-1)*SGData['MagMom'][:,nxs,nxs]
     1429    MmodA = np.sum(Am[nxs,:,:,:]*psin[:,:,nxs,nxs],axis=2)      #Nops,Natm,3
     1430    MmodB = np.sum(Bm[nxs,:,:,:]*pcos[:,:,nxs,nxs],axis=2)
     1431    MmodA = np.sum(SGMT[:,nxs,:,:]*MmodA[:,:,nxs,:],axis=-1)
     1432    MmodB = np.sum(SGMT[:,nxs,:,:]*MmodB[:,:,nxs,:],axis=-1)
     1433    MmodA = MmodA*SGData['MagMom'][:,nxs,nxs]
     1434    MmodB = MmodB*SGData['MagMom'][:,nxs,nxs]
    14331435    return MmodA,MmodB    #Nops,Natm,,Mxyz; sin & cos parts
    14341436       
  • trunk/GSASIIstrMath.py

    r4055 r4057  
    14821482    phfx = pfx.split(':')[0]+hfx
    14831483    ast = np.sqrt(np.diag(G))
    1484     GS = G/np.outer(ast,ast)
    1485     uAmat = G2lat.Gmat2AB(GS)[0]
     1484#    GS = G/np.outer(ast,ast)
     1485#    uAmat = G2lat.Gmat2AB(GS)[0]
    14861486    Mast = twopisq*np.multiply.outer(ast,ast)   
    14871487    SGInv = SGData['SGInv']
     
    15131513       
    15141514        if not SGData['SGGray']:    #for fixed Mx,My,Mz
    1515             Mmod += Gdata.T[:,nxs,:]
     1515#            Mmod += Gdata.T[:,nxs,:]
    15161516            GSdata = np.inner(Gdata.T,np.swapaxes(SGMT,1,2))  #apply sym. ops.--> Natm,Nops,Nxyz
    15171517            if SGData['SGInv'] and not SGData['SGFixed']:   #inversion if any
Note: See TracChangeset for help on using the changeset viewer.