Ignore:
Timestamp:
Jul 31, 2020 9:04:06 AM (18 months ago)
Author:
vondreele
Message:

fix X-label for pink powder patterns
revert incomm. mag. str. factor calcs to previous best one - still not correct tho.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIstrMath.py

    r4533 r4535  
    15171517            mXYZ = np.hstack((mXYZ,mXYZ))
    15181518
    1519         MmodAp,MmodBp,MmodAm,MmodBm = G2mth.MagMod(glTau,mXYZ,modQ,MSSdata,SGData,SSGData)  #Ntau,Nops,Natm,Mxyz cos,sim parts sum matches drawing
    1520 #        MmodAp,MmodBp,MmodAm,MmodBm = G2mth.MagMod2(mXYZ,modQ,MSSdata,SGData,SSGData)  #Nops,Natm,Mxyz cos,sim parts sum matches drawing
     1519        MmodA,MmodB = G2mth.MagMod(glTau,mXYZ,modQ,MSSdata,SGData,SSGData)  #Ntau,Nops,Natm,Mxyz cos,sim parts sum matches drawing
    15211520       
    15221521        if not SGData['SGGray']:    #for fixed Mx,My,Mz
     
    15531552        for iel,El in enumerate(refDict['FF']['El']):
    15541553            refDict['FF']['FF'].T[iel] = G2el.ScatFac(FFtables[El],SQ)
    1555 #    time0 = time.time()
    15561554#reflection processing begins here - big arrays!
    15571555    iBeg = 0
     
    16031601            eM = (HM/np.sqrt(np.sum(HM**2,axis=0))).T    # normalize  HP  Nref,hkl=Unit vectors || Q
    16041602
    1605 #            fam0 = 0.
    1606 #            fbm0 = 0.
    16071603            if not SGData['SGGray']:     #correct -fixed Mx,My,Mz contribution             
    16081604                fam0 = TMcorr[:,nxs,:,nxs]*GSdata[nxs,:,:,:]*cosm[:,:,:,nxs]    #Nref,Nops,Natm,Mxyz
    16091605                fbm0 = TMcorr[:,nxs,:,nxs]*GSdata[nxs,:,:,:]*sinm[:,:,:,nxs]
    16101606#  calc mag. structure factors; Nref,Ntau,Nops,Natm,Mxyz                           
    1611 #            fams = TMcorr[:,nxs,nxs,:,nxs]*np.array([np.where(H[3,i]!=0,(MmodA*cosm[i,nxs,:,:,nxs]+   
    1612 #                H[3,i]*MmodB*sinm[i,nxs,:,:,nxs]),0.) for i in range(mRef)])          #Nref,Ntau,Nops,Natm,Mxyz
    1613 #                       
    1614 #            fbms = TMcorr[:,nxs,nxs,:,nxs]*np.array([np.where(H[3,i]!=0,(MmodA*sinm[i,nxs,:,:,nxs]+   
    1615 #                H[3,i]*MmodB*cosm[i,nxs,:,:,nxs]),0.) for i in range(mRef)])          #Nref,Ntau,Nops,Natm,Mxyz
    1616 #
    1617 #            if not SGData['SGGray']:           
    1618 #                fams += fam0[:,nxs,:,:,:]
    1619 #                fbms += fbm0[:,nxs,:,:,:]
    1620                
    1621             fams = TMcorr[:,nxs,nxs,:,nxs]*np.array([np.where(H[3,i]!=0,np.where(H[3,i]>0,
    1622                 (MmodAp*cosm[i,nxs,:,:,nxs]+MmodBp*sinm[i,nxs,:,:,nxs]),
    1623                 (MmodAm*cosm[i,nxs,:,:,nxs]+MmodBm*sinm[i,nxs,:,:,nxs])),0.) for i in range(mRef)])  #Nref,Nops,Natm,Mxyz
     1607            fams = TMcorr[:,nxs,nxs,:,nxs]*np.array([np.where(H[3,i]!=0,(MmodA*cosm[i,nxs,:,:,nxs]+   
     1608                H[3,i]*MmodB*sinm[i,nxs,:,:,nxs]),0.) for i in range(mRef)])          #Nref,Ntau,Nops,Natm,Mxyz
    16241609                       
    1625             fbms = TMcorr[:,nxs,nxs,:,nxs]*np.array([np.where(H[3,i]!=0,np.where(H[3,i]>0,
    1626                 (MmodAp*sinm[i,nxs,:,:,nxs]+MmodBp*cosm[i,nxs,:,:,nxs]),
    1627                 (MmodAm*sinm[i,nxs,:,:,nxs]+MmodBm*cosm[i,nxs,:,:,nxs])),0.) for i in range(mRef)])  #Nref,Nops,Natm,Mxyz
     1610            fbms = TMcorr[:,nxs,nxs,:,nxs]*np.array([np.where(H[3,i]!=0,(MmodA*sinm[i,nxs,:,:,nxs]+   
     1611                H[3,i]*MmodB*cosm[i,nxs,:,:,nxs]),0.) for i in range(mRef)])          #Nref,Ntau,Nops,Natm,Mxyz
    16281612
    16291613            if not SGData['SGGray']:           
    16301614                fams += fam0[:,nxs,:,:,:]
    16311615                fbms += fbm0[:,nxs,:,:,:]
    1632                
     1616                               
    16331617#sum ops & atms                               
    16341618            fasm = np.sum(np.sum(fams,axis=-2),axis=-2)    #Nref,Mxyz; sum ops & atoms
     
    16681652            refl.T[8] = np.copy(refl.T[10])               
    16691653        iBeg += blkSize
    1670 #    print ('nRef %d time %.4f\r'%(nRef,time.time()-time0))
    16711654    return copy.deepcopy(refDict['RefList'])
    16721655
Note: See TracChangeset for help on using the changeset viewer.