Changeset 3416


Ignore:
Timestamp:
May 31, 2018 4:03:31 PM (3 years ago)
Author:
vondreele
Message:

One more tweak to Mag moment derivatives

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIstrMath.py

    r3415 r3416  
    11651165        Q = HM[:,:,nxs,nxs]*eDotK[nxs,:,:,:]-Kdata[:,nxs,:,:] #Mxyz,Nref,Nop,Natm = BPM in magstrfc.for OK
    11661166        dqdk = np.array([np.outer(hm,hm)-np.eye(3) for hm in HM.T]).T     #Mxyz**2,Nref
    1167         NQ = np.sqrt(np.sum(Q*Q,axis=0))
    1168         NQ = np.where(NQ > 0.,1./NQ,0.)
    11691167        dqdm = dqdk[:,:,:,nxs,nxs]*dkdm[:,nxs,nxs,:,:]   #Mxyz**2,Nref,Nops,Natms
    1170         dmx = Q*dMdm[:,nxs,nxs,:]/2.
     1168        dmx = Q*dMdm[:,nxs,nxs,:]
    11711169        dmx = dmx[nxs,:,:,:,:]+dqdm*Mag[nxs,nxs,nxs,:,:]
     1170        dmx /= 2.
    11721171       
    11731172        fam = Q*TMcorr[nxs,:,nxs,:]*cosm[nxs,:,:,:]*Mag[nxs,nxs,:,:]    #Mxyz,Nref,Nop,Natm
Note: See TracChangeset for help on using the changeset viewer.