- Timestamp:
- Aug 5, 2021 8:52:37 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/GSASIImath.py ¶
r5002 r5009 1730 1730 Am = np.array(MSSdata[3:]).T[:,0,:] #atoms x cos mag mods; only 1 wave used 1731 1731 Bm = np.array(MSSdata[:3]).T[:,0,:] #...sin mag mods 1732 SGMT = np.array([ops[0] for ops in SGData['SGOps']]) #not .T!!1732 SGMT = np.array([ops[0].T for ops in SGData['SGOps']]) #not .T!! 1733 1733 Sinv = np.array([nl.inv(ops[0]) for ops in SSGData['SSGOps']]) 1734 1734 SGT = np.array([ops[1] for ops in SSGData['SSGOps']]) … … 1744 1744 Sinv = np.vstack((Sinv,Sinv)) 1745 1745 SGT = np.vstack((SGT,SGT+np.array([0.,0.,0.,.5])))%1. 1746 AMR = np.swapaxes(np.inner(Am,SGMT),0,1) #Nops,Natm,Mxyz 1747 BMR = np.swapaxes(np.inner(Bm,SGMT),0,1) 1746 1748 epsinv = Sinv[:,3,3] 1747 1749 mst = np.inner(Sinv[:,:3,:3],modQ)-epsinv[:,nxs]*modQ #van Smaalen Eq. 3.3 1748 1750 phi = np.inner((XYZ-SGT[:,:3][nxs,:,:]),modQ).T 1749 1751 TA = np.sum(mst[nxs,:,:]*(XYZ-SGT[:,:3][nxs,:,:]),axis=-1).T 1750 phase = TA[nxs,:,:] + epsinv[nxs,:,nxs]*(glTau[:,nxs,nxs] )-SGT[:,3][nxs,:,nxs]+phi[nxs,:,:] #+,+,+ best for DyMnGe1752 phase = TA[nxs,:,:] + epsinv[nxs,:,nxs]*(glTau[:,nxs,nxs]+phi[nxs,:,:])-SGT[:,3][nxs,:,nxs] 1751 1753 psin = np.sin(twopi*phase) #tau,ops,atms 1752 1754 pcos = np.cos(twopi*phase) 1753 MmodAR = Am[nxs,nxs,:,:]*pcos[:,:,:,nxs] #Re cos term; tau,ops,atms, Mxyz 1754 MmodBR = Bm[nxs,nxs,:,:]*psin[:,:,:,nxs] #Re sin term 1755 MmodAR = np.sum(SGMT[nxs,:,nxs,:,:]*MmodAR[:,:,:,nxs,:],axis=-1) 1756 MmodBR = np.sum(SGMT[nxs,:,nxs,:,:]*MmodBR[:,:,:,nxs,:],axis=-1) 1757 MmodAI = Am[nxs,nxs,:,:]*psin[:,:,:,nxs] #Im cos term 1758 MmodBI = Bm[nxs,nxs,:,:]*pcos[:,:,:,nxs] #Im sin term 1759 MmodAI = np.sum(SGMT[nxs,:,nxs,:,:]*MmodAI[:,:,:,nxs,:],axis=-1) 1760 MmodBI = np.sum(SGMT[nxs,:,nxs,:,:]*MmodBI[:,:,:,nxs,:],axis=-1) 1755 MmodAR = AMR[nxs,:,:,:]*pcos[:,:,:,nxs] #Re cos term; tau,ops,atms, Mxyz 1756 MmodBR = BMR[nxs,:,:,:]*psin[:,:,:,nxs] #Re sin term 1757 MmodAI = AMR[nxs,:,:,:]*psin[:,:,:,nxs] #Im cos term 1758 MmodBI = BMR[nxs,:,:,:]*pcos[:,:,:,nxs] #Im sin term 1761 1759 return MmodAR,MmodBR,MmodAI,MmodBI #Ntau,Nops,Natm,Mxyz; Re, Im cos & sin parts 1762 1760 -
TabularUnified trunk/GSASIIstrMath.py ¶
r5001 r5009 1618 1618 MF = refDict['FF']['MF'][iBeg:iFin].T[Tindx].T #Nref,Natm 1619 1619 TMcorr = 0.539*(np.reshape(Tiso,Tuij.shape)*Tuij)[:,0,:]*Mdata*Fdata*MF/(2*Nops) #Nref,Natm 1620 HM = np.inner(Bmat ,HP.T) #put into cartesian space X||H,Z||H*L;1620 HM = np.inner(Bmat.T,HP.T) #put into cartesian space X||H,Z||H*L; 1621 1621 eM = (HM*refl.T[5]).T # normalize HP by d* Nref,hkl=Unit vectors || Q 1622 1622 … … 1627 1627 fams = TMcorr[:,nxs,nxs,:,nxs]*SGData['MagMom'][nxs,nxs,:,nxs,nxs]*np.array([np.where(H[3,i]!=0,( 1628 1628 (MmodAR+H[3,i]*MmodBR)*cosm[i,nxs,:,:,nxs]+ 1629 GamI[nxs,:,nxs,nxs]*( -MmodAI+H[3,i]*MmodBI)*sinm[i,nxs,:,:,nxs]),1629 GamI[nxs,:,nxs,nxs]*(MmodAI-H[3,i]*MmodBI)*sinm[i,nxs,:,:,nxs]), 1630 1630 0.) for i in range(mRef)])/2. #Nref,Ntau,Nops,Natm,Mxyz 1631 1631 1632 1632 fbms = TMcorr[:,nxs,nxs,:,nxs]*SGData['MagMom'][nxs,nxs,:,nxs,nxs]*np.array([np.where(H[3,i]!=0,( 1633 1633 (MmodAR+H[3,i]*MmodBR)*sinm[i,nxs,:,:,nxs]+ 1634 GamI[nxs,:,nxs,nxs]*( MmodAI-H[3,i]*MmodBI)*cosm[i,nxs,:,:,nxs]),1634 GamI[nxs,:,nxs,nxs]*(-MmodAI+H[3,i]*MmodBI)*cosm[i,nxs,:,:,nxs]), 1635 1635 0.) for i in range(mRef)])/2. #Nref,Ntau,Nops,Natm,Mxyz 1636 1636 … … 1640 1640 1641 1641 #sum ops & atms 1642 fasm = np.sum(np.sum(fams,axis=-2),axis=-2) #Nref, Mxyz; sum ops & atoms1642 fasm = np.sum(np.sum(fams,axis=-2),axis=-2) #Nref,Ntau,Mxyz; sum ops & atoms 1643 1643 fbsm = np.sum(np.sum(fbms,axis=-2),axis=-2) 1644 1644 # #put into cartesian space 1645 facm = np.inner(fasm,u Bmat) #uBmat best fit for DyMnGe1646 fbcm = np.inner(fbsm,u Bmat)1645 facm = np.inner(fasm,uAmat) #uBmat best fit for DyMnGe 1646 fbcm = np.inner(fbsm,uAmat) 1647 1647 #form e.F dot product 1648 1648 eDotFa = np.sum(eM[:,nxs,:]*facm,axis=-1) #Nref,Ntau -
TabularUnified trunk/imports/G2img_1TIF.py ¶
r4920 r5009 360 360 samplechangerpos = (not samplechangerpos) and 0.0 or samplechangerpos 361 361 data = {'pixelSize':pixy,'wavelength':wavelength,'distance':distance,'center':center,'size':sizexy, 362 'setdist':distance,'PolaVal':[polarization,False],'samplechangerpos':samplechangerpos }362 'setdist':distance,'PolaVal':[polarization,False],'samplechangerpos':samplechangerpos,'det2theta':0.0} 363 363 File.close() 364 364 return head,data,Npix,image -
TabularUnified trunk/imports/G2img_ADSC.py ¶
r3136 r5009 71 71 center[1] = float(line.split('=')[1]) 72 72 head.append(line) 73 data = {'pixelSize':pixel,'wavelength':wave,'distance':distance,'center':center,'size':[size,size] }73 data = {'pixelSize':pixel,'wavelength':wave,'distance':distance,'center':center,'size':[size,size],'det2theta':0.0} 74 74 image = [] 75 75 pos = 512 -
TabularUnified trunk/imports/G2img_CheMin.py ¶
r3136 r5009 51 51 pixy = list(self.Image.shape) 52 52 sizexy = [40.,40.] 53 self.Data = {'wavelength': 1.78892, 'pixelSize': sizexy, 'distance': 18.0,'size':pixy }53 self.Data = {'wavelength': 1.78892, 'pixelSize': sizexy, 'distance': 18.0,'size':pixy,'det2theta':0.0} 54 54 self.Data['center'] = [pixy[0]*sizexy[0]/1000.,pixy[1]*sizexy[1]/2000.] 55 55 self.LoadImage(ParentFrame,filename) -
TabularUnified trunk/imports/G2img_GE.py ¶
r4112 r5009 195 195 sum = False 196 196 image = np.reshape(image,(sizexy[1],sizexy[0])) 197 data = {'pixelSize':[200.,200.],'wavelength':0.15,'distance':250.0,'center':[204.8,204.8],'size':sizexy }197 data = {'pixelSize':[200.,200.],'wavelength':0.15,'distance':250.0,'center':[204.8,204.8],'size':sizexy,'det2theta':0.0} 198 198 File.close() 199 199 if GSASIIpath.GetConfigValue('debug'): -
TabularUnified trunk/imports/G2img_HDF5.py ¶
r3361 r5009 133 133 Npix = sizexy[0]*sizexy[1] 134 134 data = {'pixelSize':[74.8,74.8],'wavelength':0.15,'distance':1000., 135 'center':[sizexy[0]*0.1,sizexy[1]*0.1],'size':sizexy }135 'center':[sizexy[0]*0.1,sizexy[1]*0.1],'size':sizexy,'det2theta':0.0} 136 136 for item in self.Comments: 137 137 name,val = item.split(':',1) -
TabularUnified trunk/imports/G2img_MAR.py ¶
r4112 r5009 72 72 if line: 73 73 head.append(line) 74 data = {'pixelSize':pixel,'wavelength':wave,'distance':distance,'center':center }74 data = {'pixelSize':pixel,'wavelength':wave,'distance':distance,'center':center,'det2theta':0.0} 75 75 for line in head: 76 76 if 'FORMAT' in line[0:6]: -
TabularUnified trunk/imports/G2img_Rigaku.py ¶
r3136 r5009 69 69 pixSize = [50.,50.] 70 70 image = np.reshape(image,(sizexy[1],sizexy[0])) 71 data = {'pixelSize':pixSize,'wavelength':1.5428,'distance':250.0,'center':[150.,150.],'size':sizexy }71 data = {'pixelSize':pixSize,'wavelength':1.5428,'distance':250.0,'center':[150.,150.],'size':sizexy,'det2theta':0.0} 72 72 File.close() 73 73 if imageOnly: -
TabularUnified trunk/imports/G2img_SFRM.py ¶
r4339 r5009 116 116 image = np.reshape(img,(sizexy[1],sizexy[0])) 117 117 print ('import time: %.3f'%(time.time()-time0)) 118 data = {'pixelSize':pixSize,'wavelength':wave,'distance':dist,'center':cent, 118 data = {'pixelSize':pixSize,'wavelength':wave,'distance':dist,'center':cent,,'det2theta':0.0, 119 119 'size':sizexy,'target':target,'tilt':-twoth,'rotation':90.,'twoth':str(round(twoth,1))} 120 120 data['pixLimit'] = 5
Note: See TracChangeset
for help on using the changeset viewer.