Changeset 3339


Ignore:
Timestamp:
Apr 7, 2018 9:57:59 AM (5 years ago)
Author:
vondreele
Message:

fix to magstructure factor calc for multiple mag atoms
fxn now OK, but derivs not.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIstrMath.py

    r3338 r3339  
    811811    if not Xdata.size:          #no atoms in phase!
    812812        return
    813     Mag = np.sqrt(np.inner(Gdata.T,np.inner(Gdata.T,GS)))
     813    Mag = np.sqrt(np.array([np.inner(mag,np.inner(mag,GS)) for mag in Gdata.T]))
    814814    Gdata = np.where(Mag>0.,Gdata/Mag,0.)       #normalze mag. moments
    815815    Gdata = np.inner(Gdata.T,SGMT).T            #apply sym. ops.
     
    10901090        return {}
    10911091    mSize = len(Mdata)
    1092     Mag = np.sqrt(np.inner(Gdata.T,np.inner(Gdata.T,GS))).flatten()
     1092    Mag = np.sqrt(np.array([np.inner(mag,np.inner(mag,GS)) for mag in Gdata.T]))
    10931093    dGdM = np.repeat(Gdata[:,nxs,:],Nops,axis=1)
    10941094    Gdata = np.inner(Gdata.T,SGMT).T            #apply sym. ops.
Note: See TracChangeset for help on using the changeset viewer.