Changeset 4084
- Timestamp:
- Aug 9, 2019 9:34:13 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/G2shapes.py
r4079 r4084 21 21 # this version modified by R B. Von Dreele for inclusion in GSAS-II 22 22 23 from __future__ import division, print_function 23 24 import math 24 25 import sys -
trunk/GSASIIplot.py
r4079 r4084 1026 1026 if not new: 1027 1027 if not newPlot: 1028 xylim = lim1028 xylim = copy.copy(lim) 1029 1029 else: 1030 1030 Page.canvas.mpl_connect('button_press_event', OnSCPress) … … 1272 1272 if not new: 1273 1273 if not newPlot: 1274 xylim = lim1274 xylim = copy.copy(lim) 1275 1275 else: 1276 1276 newPlot = True … … 4802 4802 if not new: 4803 4803 if not newPlot: 4804 xylim = lim4804 xylim = copy.copy(lim) 4805 4805 else: 4806 4806 newPlot = True … … 4963 4963 if not new: 4964 4964 if not newPlot: 4965 xylim = lim4965 xylim = copy.copy(lim) 4966 4966 else: 4967 4967 newPlot = True … … 5058 5058 if not new: 5059 5059 if not newPlot: 5060 xylim = lim5060 xylim = copy.copy(lim) 5061 5061 else: 5062 5062 newPlot = True … … 5186 5186 if not new: 5187 5187 if not newPlot: 5188 xylim = lim5188 xylim = copy.copy(lim) 5189 5189 else: 5190 5190 newPlot = True … … 5228 5228 elif 'Pair' in PlotText: 5229 5229 PlotSASDPairDist(G2frame) 5230 5231 5230 5232 5231 def OnMotion(event): … … 5301 5300 Plot.set_ylabel(r'$Pair\ distribution,\ P(R)$',fontsize=14) 5302 5301 Plot.bar(Bins-Dbins,BinMag,Dbins,facecolor='white',edgecolor='green') #plot diameters 5303 colors=['b','r','c','m','k'] 5302 if 'Pair Calc' in data['Pair']: 5303 [Rbins,Dist] = data['Pair']['Pair Calc'].T 5304 Plot.plot(Rbins,Dist,color='r') #plot radii 5304 5305 Page.canvas.draw() 5305 5306 … … 5433 5434 if not new: 5434 5435 if not G2frame.G2plotNB.allowZoomReset: # save previous limits 5435 xylim = lim5436 xylim = copy.copy(lim) 5436 5437 else: 5437 5438 Page.canvas.mpl_connect('motion_notify_event', OnMotion) … … 7686 7687 if not new: 7687 7688 if not newPlot: 7688 xylim = lim7689 xylim = copy.copy(lim) 7689 7690 else: 7690 7691 Page.canvas.mpl_connect('motion_notify_event', OnMotion) … … 7741 7742 if not new: 7742 7743 if not newPlot: 7743 xylim = lim7744 xylim = copy.copy(lim) 7744 7745 else: 7745 7746 Page.canvas.mpl_connect('motion_notify_event', OnMotion) … … 9267 9268 GL.glTranslate(x,y,z) 9268 9269 q = GLU.gluNewQuadric() 9269 GLU.gluSphere(q,radius, 20,10)9270 GLU.gluSphere(q,radius,40,20) 9270 9271 GL.glPopMatrix() 9271 9272 … … 9299 9300 for iat,atom in enumerate(XYZ): 9300 9301 x,y,z = atom 9301 color = (144,144,144)9302 color = np.array([144,144,144])/255. 9302 9303 RenderSphere(x,y,z,radius,color) 9303 9304 try: -
trunk/GSASIIpwdGUI.py
r4081 r4084 5658 5658 def OnShapeSelect(event): 5659 5659 r,c = event.GetRow(),event.GetCol() 5660 shapeTable.SetValue(r,c,False) 5660 for i in [1,2]: 5661 for j in range(len(Patterns)): 5662 shapeTable.SetValue(j,i,False) 5663 shapeTable.SetValue(r,c,True) 5664 ShapesResult.ForceRefresh() 5661 5665 selAtoms = Atoms[2*r+(c-1)] 5662 5666 pattern = Patterns[r] 5663 PRvals = PRcalc[r]5667 data['Pair']['Pair Calc'] = np.array([PRcalc[r][0],PRcalc[r][2]]).T 5664 5668 print('%s %d'%('num. beads',len(selAtoms[1]))) 5665 5669 print('%s %.3f'%('selected r value',pattern[-1])) 5666 print('%s %.3f'%('selected Delta P(r)',PR vals[-1]))5670 print('%s %.3f'%('selected Delta P(r)',PRcalc[r][-1])) 5667 5671 G2plt.PlotSASDPairDist(G2frame) 5668 5672 RefreshPlots(True) … … 5719 5723 tableVals = [] 5720 5724 for i in range(len(Patterns)): 5721 tableVals.append([Atoms[2*i][0],False,False,Patterns[i][-1],PRcalc[i][-1],len(Atoms[2* 1][1]),len(Atoms[2*i+1][1])])5725 tableVals.append([Atoms[2*i][0],False,False,Patterns[i][-1],PRcalc[i][-1],len(Atoms[2*i][1]),len(Atoms[2*i+1][1])]) 5722 5726 shapeTable = G2G.Table(tableVals,rowLabels=rowLabels,colLabels=colLabels,types=Types) 5723 5727 ShapesResult = G2G.GSGrid(G2frame.dataWindow) 5724 5728 ShapesResult.SetTable(shapeTable,True) 5725 5729 ShapesResult.AutoSizeColumns(False) 5726 ShapesResult.Bind(wg.EVT_GRID_CELL_ CHANGED, OnShapeSelect)5730 ShapesResult.Bind(wg.EVT_GRID_CELL_LEFT_CLICK, OnShapeSelect) 5727 5731 for r in range(len(Patterns)): 5728 5732 for c in range(7):
Note: See TracChangeset
for help on using the changeset viewer.