Changeset 327
- Timestamp:
- Jul 1, 2011 12:10:28 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASII.py
r311 r327 21 21 import wx 22 22 import matplotlib as mpl 23 import mkl 23 24 24 25 # load the GSAS routines … … 41 42 print "scipy: ",sp.__version__ 42 43 print "OpenGL: ",ogl.__version__ 44 print "Max threads ",mkl.get_max_threads() 43 45 44 46 __version__ = '0.1.5' -
trunk/GSASIIElem.py
r291 r327 34 34 ElS = El.upper() 35 35 ElS = ElS.rjust(2) 36 filename = os.path.join( sys.path[1],'atmdata.dat')36 filename = os.path.join(os.path.split(sys.argv[0])[0],'atmdata.dat') 37 37 try: 38 38 FFdata = open(filename,'Ur') … … 84 84 else: 85 85 ElS = El.upper()[:1].rjust(2) 86 filename = os.path.join( sys.path[1],'atmdata.dat')86 filename = os.path.join(os.path.split(sys.argv[0])[0],'atmdata.dat') 87 87 try: 88 88 FFdata = open(filename,'Ur') … … 131 131 ElS = El.upper() 132 132 ElS = ElS.ljust(2) 133 filename = os.path.join( sys.path[1],'Xsect.dat')133 filename = os.path.join(os.path.split(sys.argv[0])[0],'Xsect.dat') 134 134 try: 135 135 xsec = open(filename,'Ur') … … 206 206 ElS = El.upper() 207 207 ElS = ElS.rjust(2) 208 filename = os.path.join( sys.path[1],'atmdata.dat')208 filename = os.path.join(os.path.split(sys.argv[0])[0],'atmdata.dat') 209 209 try: 210 210 FFdata = open(filename,'Ur') -
trunk/GSASIIphsGUI.py
r326 r327 1921 1921 def OnPfType(event): 1922 1922 textureData['PlotType'] = pfType.GetValue() 1923 print 'before'1924 1923 UpdateDData() 1925 print 'after' 1926 G2plt.PlotTexture(self,data,newPlot=True) 1924 G2plt.PlotTexture(self,data) 1927 1925 1928 1926 def OnPFValue(event): … … 1946 1944 Obj.SetValue('%3.1f,%3.1f,%3.1f'%(xyz[0],xyz[1],xyz[2])) 1947 1945 textureData['PFxyz'] = xyz 1948 G2plt.PlotTexture(self,data ,newPlot=True)1946 G2plt.PlotTexture(self,data) 1949 1947 1950 1948 def OnShowData(event): … … 2607 2605 UpdateDData() 2608 2606 G2plt.PlotStrain(self,data) 2609 G2plt.PlotTexture(self,data, newPlot=True)2607 G2plt.PlotTexture(self,data,Start=True) 2610 2608 elif text == 'Draw Options': 2611 2609 self.dataFrame.SetMenuBar(self.dataFrame.BlankMenu) -
trunk/GSASIIplot.py
r326 r327 1192 1192 Page.canvas.draw() 1193 1193 1194 def PlotTexture(self,data,newPlot=False ):1194 def PlotTexture(self,data,newPlot=False,Start=False): 1195 1195 '''Pole figure, inverse pole figure(?), 3D pole distribution and 3D inverse pole distribution(?) 1196 1196 plotting; Need way to select … … 1211 1211 SHCoef = SHData['SH Coeff'][1] 1212 1212 cell = generalData['Cell'][1:7] 1213 Start = True1214 1213 1215 1214 def OnMotion(event): … … 1264 1263 R = np.where(R <= 1.,2.*npasind(R*0.70710678),0.0) 1265 1264 Z = np.zeros_like(R) 1266 time0 = time.time()1267 1265 Z = G2lat.invpolfcal(ODFln,SGData,R,P) 1268 print 'inverse time:',time.time()-time01269 1266 Z = np.reshape(Z,(npts,npts)) 1270 1267 CS = Plot.contour(Y,X,Z,aspect='equal') … … 1272 1269 Img = Plot.imshow(Z.T,aspect='equal',cmap='binary',extent=[-1,1,-1,1]) 1273 1270 if newPlot: 1274 Page.figure.colorbar(Img) 1271 # Page.figure.colorbar(Img) #colorbar fails - crashes gsasii 1275 1272 newPlot = False 1276 1273 Plot.set_title('Inverse pole figure for XYZ='+str(SHData['PFxyz'])) 1277 print 'inverse pole figure',Img1278 1274 1279 1275 else: … … 1286 1282 R = np.where(R <= 1.,2.*npasind(R*0.70710678),0.0) 1287 1283 Z = np.zeros_like(R) 1288 time0 = time.time()1289 1284 Z = G2lat.polfcal(ODFln,SamSym[textureData['Model']],R,P) 1290 print 'polfig time:',time.time()-time01291 1285 Z = np.reshape(Z,(npts,npts)) 1292 1286 CS = Plot.contour(Y,X,Z,aspect='equal') … … 1294 1288 Img = Plot.imshow(Z.T,aspect='equal',cmap='binary',extent=[-1,1,-1,1]) 1295 1289 if newPlot: 1296 Page.figure.colorbar(Img) 1290 # Page.figure.colorbar(Img) #colorbar fails - crashes gsasii 1297 1291 newPlot = False 1298 1292 Plot.set_title('Pole figure for HKL='+str(SHData['PFhkl'])) 1299 print 'pole figure',Img1300 1293 Page.canvas.draw() 1294 1301 1295 1302 1296 def PlotExposedImage(self,newPlot=False,event=None):
Note: See TracChangeset
for help on using the changeset viewer.