Changeset 327 for trunk/GSASIIplot.py
- Timestamp:
- Jul 1, 2011 12:10:28 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.