Changeset 4185 for trunk


Ignore:
Timestamp:
Oct 21, 2019 3:17:29 PM (6 years ago)
Author:
vondreele
Message:

mag math again

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/GSASIImath.py

    r4183 r4185  
    13911391    psin = np.sin(twopi*phase)
    13921392    pcos = np.cos(twopi*phase)
    1393     MmodA = np.sum(Am[nxs,nxs,:,:,:]*pcos[:,:,:,nxs,nxs],axis=3)    #cos term
    1394     MmodB = np.sum(Bm[nxs,nxs,:,:,:]*psin[:,:,:,nxs,nxs],axis=3)    #sin term
     1393    MmodA = np.sum(Am[nxs,nxs,:,:,:]*pcos[:,:,:,nxs,nxs],axis=3)/2.    #cos term
     1394    MmodB = np.sum(Bm[nxs,nxs,:,:,:]*psin[:,:,:,nxs,nxs],axis=3)/2.    #sin term
    13951395    MmodA = np.sum(SGMT[nxs,:,nxs,:,:]*MmodA[:,:,:,nxs,:],axis=-1)*SGData['MagMom'][nxs,:,nxs,nxs]
    13961396    MmodB = np.sum(SGMT[nxs,:,nxs,:,:]*MmodB[:,:,:,nxs,:],axis=-1)*SGData['MagMom'][nxs,:,nxs,nxs]
  • TabularUnified trunk/GSASIIplot.py

    r4167 r4185  
    50415041    def OnMotion(event):
    50425042        xpos = event.xdata
    5043         if Xmin<xpos<Xmax:                                        #avoid out of frame mouse position
     5043        if xpos and Xmin<xpos<Xmax:                                        #avoid out of frame mouse position
    50445044            ypos = event.ydata
    5045             if Ymin<ypos<Ymax:
     5045            if ypos and Ymin<ypos<Ymax:
    50465046                Xwd = Xmax-Xmin
    50475047                Ywd = Ymax-Ymin
  • TabularUnified trunk/GSASIIstrMath.py

    r4182 r4185  
    16421642#do integration
    16431643           
    1644             fas = np.sum(glWt*fass,axis=1)/2.
    1645             fbs = np.sum(glWt*fbss,axis=1)/2.
     1644            fas = np.sum(glWt*fass,axis=1)
     1645            fbs = np.sum(glWt*fbss,axis=1)
    16461646           
    16471647            if SGData['SGInv']:
Note: See TracChangeset for help on using the changeset viewer.