Changeset 4032 for trunk/GSASIIplot.py
- Timestamp:
- Jun 19, 2019 4:13:00 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIplot.py
r4021 r4032 6531 6531 Page.figure.suptitle('Left-click to create an arc mask',color='r',fontweight='bold') 6532 6532 Page.canvas.draw() 6533 elif G2frame.MaskKey == 'x': 6534 new,plotNum,Page,Plot,lim = G2frame.G2plotNB.FindPlotTab('2D Powder Image','mpl',newImage=False) 6535 Page.figure.suptitle('Left-click to create an x-line mask',color='r',fontweight='bold') 6536 Page.canvas.draw() 6537 elif G2frame.MaskKey == 'y': 6538 new,plotNum,Page,Plot,lim = G2frame.G2plotNB.FindPlotTab('2D Powder Image','mpl',newImage=False) 6539 Page.figure.suptitle('Left-click to create an y-line mask',color='r',fontweight='bold') 6540 Page.canvas.draw() 6533 6541 elif G2frame.MaskKey == 'r': 6534 6542 new,plotNum,Page,Plot,lim = G2frame.G2plotNB.FindPlotTab('2D Powder Image','mpl',newImage=False) … … 6746 6754 Page.canvas.draw() 6747 6755 return 6748 elif event.key in ['l','p','f','a','r' ]:6756 elif event.key in ['l','p','f','a','r','x','y']: 6749 6757 G2frame.MaskKey = event.key 6750 6758 OnStartMask(G2frame) … … 6922 6930 pickType = pick.itemType 6923 6931 except: 6924 pickType = '?'6932 pickType = None 6925 6933 if pickType == "Spot": 6926 6934 itemNum = G2frame.itemPicked.itemNumber … … 7059 7067 pickType = pick.itemType 7060 7068 except: # should not happen anymore 7061 pickType = '?'7069 pickType = None 7062 7070 if pickType == 'Spot': 7063 7071 pl = [pick,] … … 7198 7206 wx.CallAfter(PlotImage,G2frame,newImage=True) 7199 7207 return 7200 elif G2frame.MaskKey =='p' or G2frame.MaskKey =='f':7208 elif G2frame.MaskKey in ['p','f']: 7201 7209 if G2frame.MaskKey =='p': 7202 7210 polygon = Masks['Polygons'][-1] … … 7232 7240 #G2imG.UpdateMasks(G2frame,Masks) 7233 7241 return 7242 elif G2frame.MaskKey in ['x','y']: 7243 Xpix,Ypix = int(Xpos*scalex),int(Ypos*scaley) 7244 if G2frame.MaskKey == 'y': 7245 Masks['Ylines'].append(Xpix) 7246 else: 7247 Masks['Xlines'].append(Ypix) 7248 G2imG.UpdateMasks(G2frame,Masks) 7249 wx.CallAfter(PlotImage,G2frame,newImage=True) 7250 return 7234 7251 G2imG.UpdateMasks(G2frame,Masks) 7235 7252 wx.CallAfter(PlotImage,G2frame,newImage=False) … … 7378 7395 elif G2frame.GPXtree.GetItemText(G2frame.PickId) in ['Masks',]: 7379 7396 Page.Choice = [' key press','a: arc mask','r: ring mask', 7397 'x: x line mask','y: y line mask', 7380 7398 'p: polygon mask','f: frame mask', 7381 7399 't: add spot mask at mouse position', … … 7414 7432 Imin,Imax = Data['range'][1] 7415 7433 MA = ma.masked_greater(ma.masked_less(G2frame.ImageZ,Zlim[0]),Zlim[1]) 7434 7416 7435 MaskA = ma.getmaskarray(MA) 7417 7436 A = G2img.ImageCompress(MA,imScale)
Note: See TracChangeset
for help on using the changeset viewer.