Changeset 239 for trunk/GSASIIplot.py
- Timestamp:
- Jan 13, 2011 1:34:07 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/GSASIIplot.py ¶
r231 r239 837 837 G2gd.GetPatternTreeItemId(self,self.Image, 'Image Controls')) 838 838 Page.canvas.SetToolTipString('') 839 size = len(self.ImageZ)839 sizexy = Data['size'] 840 840 if event.xdata and event.ydata: #avoid out of frame errors 841 841 Page.canvas.SetCursor(wx.CROSS_CURSOR) … … 863 863 ypix = ypos*scaley 864 864 Int = 0 865 if (0 <= xpix <= size ) and (0 <= ypix <= size):865 if (0 <= xpix <= sizexy[0]) and (0 <= ypix <= sizexy[1]): 866 866 Int = self.ImageZ[ypix][xpix] 867 867 tth,azm,dsp = G2img.GetTthAzmDsp(xpos,ypos,Data) … … 947 947 pixLimit = Data['pixLimit'] 948 948 if self.itemPicked is None and PickName == 'Image Controls': 949 size = len(self.ImageZ) 949 # sizexy = Data['size'] 950 950 Xpos = event.xdata 951 951 if not (Xpos and self.ifGetRing): #got point out of frame … … 1081 1081 if len(self.ImageZ) > 1024: 1082 1082 imScale = len(self.ImageZ)/1024 1083 sizexy = Data['size'] 1083 1084 pixelSize = Data['pixelSize'] 1085 # print sizexy,pixelSize,len(self.ImageZ),len(self.ImageZ[0]) 1084 1086 scalex = 1000./pixelSize[0] 1085 1087 scaley = 1000./pixelSize[1] 1086 xmax = len(self.ImageZ)1087 Xmax = len(self.ImageZ)*pixelSize[0]/1000.1088 Xmax = sizexy[0]*pixelSize[0]/1000. 1089 Ymax = sizexy[1]*pixelSize[1]/1000. 1088 1090 xlim = (-0.5,Xmax-.5) 1089 ylim = ( Xmax-.5,-0.5,)1091 ylim = (Ymax-.5,-0.5,) 1090 1092 Imin,Imax = Data['range'][1] 1091 1093 acolor = mpl.cm.get_cmap(Data['color'])
Note: See TracChangeset
for help on using the changeset viewer.