Changeset 54
- Timestamp:
- Apr 27, 2010 12:03:13 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIcomp.py
r53 r54 1355 1355 return ring 1356 1356 1357 def makeIdealRing(ellipse): 1358 cent,phi,radii = ellipse 1359 cphi = cosd(phi) 1360 sphi = sind(phi) 1361 ring = [] 1362 for a in range(0,360,2): 1363 x = radii[0]*cosd(a) 1364 y = radii[1]*sind(a) 1365 X = (cphi*x-sphi*y+cent[0]) 1366 Y = (sphi*x+cphi*y+cent[1]) 1367 ring.append([X,Y]) 1368 return ring 1369 1357 1370 def calcDist(radii,tth): 1358 1371 stth = sind(tth) -
trunk/GSASIIplot.py
r53 r54 248 248 ypos = event.ydata 249 249 wave = self.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(self, \ 250 PatternId, 'Instrument Parameters'))[0][1]250 self.PatternId, 'Instrument Parameters'))[0][1] 251 251 dsp = 0.0 252 252 if abs(xpos) > 0.: … … 381 381 acolor = mpl.cm.get_cmap('Paired') 382 382 Plot.contourf(ContourX,ContourY,ContourZ,cmap=acolor) 383 # Plot.set_ylim(0,Nseq-1) 383 Plot.set_ylim(0,Nseq-1) 384 newPlot = True 384 385 else: 385 386 self.Lines = Lines … … 825 826 x,y = G2cmp.GetTthAzm(xring,yring,Data) 826 827 Plot.plot(y,x,'r+') 828 for ellipse in Data['ellipses']: 829 ring = np.array(G2cmp.makeIdealRing(ellipse[:3])) #skip color 830 x,y = np.hsplit(ring,2) 831 tth,azm = G2cmp.GetTthAzm(x,y,Data) 832 Plot.plot(azm,tth,'b') 827 833 if not newPlot: 828 834 Page.toolbar.push_current() … … 889 895 x,y = G2cmp.GetTthAzm(xring,yring,Data) 890 896 Plot.plot(x,y,'r+') 897 for ellipse in Data['ellipses']: 898 ring = np.array(G2cmp.makeIdealRing(ellipse[:3])) #skip color 899 x,y = np.hsplit(ring,2) 900 tth,azm = G2cmp.GetTthAzm(x,y,Data) 901 Plot.plot(tth,azm,'b') 891 902 if not newPlot: 892 903 Page.toolbar.push_current()
Note: See TracChangeset
for help on using the changeset viewer.