Changeset 1978
- Timestamp:
- Sep 24, 2015 4:34:39 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIImath.py
r1977 r1978 35 35 import scipy.optimize as so 36 36 import pypowder as pwd 37 if GSASIIpath.GetConfigValue('debug'): 38 import pylab as pl 37 39 38 40 sind = lambda x: np.sin(x*np.pi/180.) … … 939 941 nf = 0 940 942 nx = 0 941 XmodZ = 0942 FmodZ = 0943 XmodZ = np.zeros((Ax.shape[0],Ax.shape[1],3,32)) 944 FmodZ = np.zeros((Af.shape[0],Af.shape[1],32)) 943 945 if 'Crenel' in waveTypes: 946 nC = np.where('Crenel' in waveTypes) 944 947 nf = 1 945 FmodC = 0 #replace948 #FmodZ = 0 replace 946 949 else: 947 950 nx = 1 948 951 if 'Sawtooth' in waveTypes: 949 XmodZ = 0 #replace 950 else: 951 XmodZ = 0 #replace (use?) 952 nS = np.where('Sawtooth' in waveTypes) 953 #XmodZ = 0 replace 952 954 if Af.shape[1]: 953 955 tauF = np.arange(1.,Af.shape[1]+1-nf)[:,nxs]*glTau #Fwaves x 32 954 FmodA = Af[:,nf:,nxs]*np.sin(twopi*tauF[nxs,:,:]) 956 FmodA = Af[:,nf:,nxs]*np.sin(twopi*tauF[nxs,:,:]) #atoms X Fwaves X 32 955 957 FmodB = Bf[:,nf:,nxs]*np.cos(twopi*tauF[nxs,:,:]) 956 Fmod = np.sum(FmodA+FmodB+FmodC,axis=1) 958 Fmod = np.sum(FmodA+FmodB+FmodC,axis=1) #atoms X 32; sum waves 957 959 else: 958 960 Fmod = 1.0 -
trunk/GSASIIphsGUI.py
r1964 r1978 2378 2378 iatm,item = Indx[Obj.GetId()] 2379 2379 nt = numVals[Stype] 2380 if not len(atomData[iatm][-1][SS][item]) and waveType in [' ZigZag','Sawtooth'] and Stype == 'Spos':2380 if not len(atomData[iatm][-1][SS][item]) and waveType in ['Sawtooth',] and Stype == 'Spos': 2381 2381 nt = 4 2382 2382 atomData[iatm][-1][SS][item].append([[0.0 for i in range(nt)],False]) … … 2430 2430 Waves = wx.FlexGridSizer(0,4,5,5) 2431 2431 elif Stype == 'Spos': 2432 if waveType in [' ZigZag','Sawtooth'] and not iwave:2432 if waveType in ['Sawtooth',] and not iwave: 2433 2433 names = Names[6:] 2434 2434 Waves = wx.FlexGridSizer(0,6,5,5) … … 2526 2526 magNames = ['MXsin','MYsin','MZsin','MXcos','MYcos','MZcos'] 2527 2527 fracNames = ['Fsin','Fcos','Fzero','Fwid'] 2528 waveTypes = ['Fourier','Sawtooth',' ZigZag','Crenel/Fourier']2528 waveTypes = ['Fourier','Sawtooth','Crenel/Fourier'] 2529 2529 Labels = {'Spos':posNames,'Sfrac':fracNames,'Sadp':adpNames,'Smag':magNames} 2530 2530 mainSizer.Add(wx.StaticText(waveData,label=' Incommensurate propagation wave data:'),0,WACV) -
trunk/GSASIIplot.py
r1976 r1978 320 320 ''' 321 321 from matplotlib.patches import Circle,CirclePolygon 322 global HKL,HKLF 322 HKLref = hklRef 323 global HKL,HKLF,HKLref 323 324 324 325 def OnSCKeyPress(event): … … 353 354 Data['Type'] = pwdrChoice[event.key] 354 355 newPlot = True 355 PlotSngl(G2frame,newPlot,Data, hklRef,Title)356 PlotSngl(G2frame,newPlot,Data,HKLref,Title) 356 357 357 358 def OnSCMotion(event): … … 441 442 HKLF = [] 442 443 time0 = time.time() 443 for refl in hklRef:444 for refl in HKLref: 444 445 H = refl[:3] 445 446 if 'HKLF' in Name: -
trunk/GSASIIstrIO.py
r1956 r1978 1168 1168 stiw = str(i)+':'+str(iw) 1169 1169 if Stype == 'Spos': 1170 if waveType in [' ZigZag','Sawtooth'] and not iw:1170 if waveType in ['Sawtooth',] and not iw: 1171 1171 names = [pfx+'Tzero:'+stiw,pfx+'Xslope:'+stiw,pfx+'Yslope:'+stiw,pfx+'Zslope:'+stiw] 1172 1172 equivs = [[], [],[],[]] … … 1586 1586 nt = 6 1587 1587 ot = 0 1588 if waveType in ['Sawtooth', 'ZigZag'] and not iw:1588 if waveType in ['Sawtooth',] and not iw: 1589 1589 nt = 4 1590 1590 ot = 6 … … 1905 1905 stiw = str(i)+':'+str(iw) 1906 1906 if Stype == 'Spos': 1907 if waveType in [' ZigZag','Sawtooth'] and not iw:1907 if waveType in ['Sawtooth',] and not iw: 1908 1908 names = ['Tzero:'+stiw,'Xslope:'+stiw,'Yslope:'+stiw,'Zslope:'+stiw] 1909 1909 else: -
trunk/GSASIIstrMath.py
r1977 r1978 629 629 if parm in parmDict: 630 630 keys[key][m][iatm] = parmDict[parm] 631 return waveTypes,FSSdata,XSSdata,USSdata,MSSdata631 return np.array(waveTypes),FSSdata,XSSdata,USSdata,MSSdata 632 632 633 633 def GetSSTauM(SGOps,SSOps,pfx,calcControls,XData): … … 1025 1025 HM += H 1026 1026 Uniq = np.inner(HM[:3],SGMT) 1027 SSUniq = np.inner(H M,SSGMT)1027 SSUniq = np.inner(H,SSGMT) 1028 1028 Phi = np.inner(HM[:3],SGT) 1029 SSPhi = np.inner(H M,SSGT)1029 SSPhi = np.inner(H,SSGT) 1030 1030 if SGInv: #if centro - expand HKL sets 1031 1031 Uniq = np.vstack((Uniq,-Uniq)) … … 1034 1034 SSPhi = np.hstack((SSPhi,-SSPhi)) 1035 1035 # GSASIIpath.IPyBreak() 1036 GfpuA = G2mth.Modulation(waveTypes,SSUniq,FSSdata,XSSdata,USSdata,Mast) 1036 GfpuA = G2mth.Modulation(waveTypes,SSUniq,FSSdata,XSSdata,USSdata,Mast) #2 x sym X atoms 1037 1037 phase = twopi*(np.inner(Uniq,(dXdata.T+Xdata.T))+SSPhi[:,np.newaxis]) 1038 1038 sinp = np.sin(phase) … … 1044 1044 Tcorr = Tiso*Tuij*Mdata*Fdata/len(Uniq) 1045 1045 fa = np.array([(FF+FP-Bab)*cosp*Tcorr,-FPP*sinp*Tcorr]) #2 x sym x atoms 1046 fb = np.array([ (FF+FP-Bab)*sinp*Tcorr,FPP*cosp*Tcorr])1046 fb = np.array([FPP*cosp*Tcorr,(FF+FP-Bab)*sinp*Tcorr]) #swapped around - better? 1047 1047 fa *= GfpuA 1048 1048 fb *= GfpuA 1049 fas = np. real(np.sum(np.sum(fa,axis=1),axis=1))1050 fbs = np. real(np.sum(np.sum(fb,axis=1),axis=1))1049 fas = np.sum(np.sum(fa,axis=1),axis=1) 1050 fbs = np.sum(np.sum(fb,axis=1),axis=1) 1051 1051 fasq = fas**2 1052 1052 fbsq = fbs**2 #imaginary
Note: See TracChangeset
for help on using the changeset viewer.