Changeset 184


Ignore:
Timestamp:
Nov 22, 2010 11:06:57 AM (12 years ago)
Author:
vondreele
Message:

fixes to min/max image sliders
fixes to polygon mask interface

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIimgGUI.py

    r183 r184  
    4747       
    4848    def OnMaxSlider(event):
    49         sqrtDeltZero = math.sqrt(data['range'][0][1]-data['range'][0][0])
     49        sqrtDeltZero = math.sqrt(data['range'][0][1])
    5050        imax = int(maxSel.GetValue())*sqrtDeltZero/100.
    51         data['range'][1][1] = imax**2+data['range'][0][0]
     51        data['range'][1][1] = imax**2
    5252        data['range'][1][0] = max(0.0,min(data['range'][1][1]-1,data['range'][1][0]))
    53         DeltOne = data['range'][1][1]-data['range'][0][0]
    54         minSel.SetValue(int(100*(data['range'][1][0]-data['range'][0][0])/DeltOne))
     53        DeltOne = max(1.0,data['range'][1][1]-data['range'][1][0])
     54        minSel.SetValue(int(100*(data['range'][1][0]/DeltOne)))
    5555        G2plt.PlotExposedImage(self,event=event)
    5656       
    5757    def OnMinSlider(event):
    58         DeltOne = data['range'][1][1]-data['range'][0][0]
     58        DeltOne = data['range'][1][1]-data['range'][1][0]
    5959        imin = int(minSel.GetValue())*DeltOne/100.
    60         data['range'][1][0] = max(0.0,min(data['range'][1][1]-1,imin)+data['range'][0][0])
     60        data['range'][1][0] = max(0.0,min(data['range'][1][1]-1,imin))
    6161        G2plt.PlotExposedImage(self,event=event)
    6262       
  • trunk/GSASIIplot.py

    r180 r184  
    728728                tth,azm,dsp = G2img.GetTthAzmDsp(xpos,ypos,Data)
    729729                Q = 2.*math.pi/dsp
    730                 self.G2plotNB.status.SetFields(\
    731                     ['','Detector 2-th =%9.2fdeg, dsp =%9.3fA, Q = %6.3fA-1, azm = %7.2fdeg, I = %6d'%(tth,dsp,Q,azm,Int)])
     730                if self.setPoly:
     731                    self.G2plotNB.status.SetFields(['','Polygon mask pick - LB next point, RB close polygon'])
     732                else:
     733                    self.G2plotNB.status.SetFields(\
     734                        ['','Detector 2-th =%9.2fdeg, dsp =%9.3fA, Q = %6.3fA-1, azm = %7.2fdeg, I = %6d'%(tth,dsp,Q,azm,Int)])
    732735
    733736    def OnImPlotKeyPress(event):
     
    756759                self.setPoly = True
    757760                Masks['Polygons'].append([])
    758                 self.G2plotNB.status.SetFields(['','Polygon mask active - LB pick points, RB closepolygon'])
     761                self.G2plotNB.status.SetFields(['','Polygon mask active - LB pick next point, RB close polygon'])
    759762            G2imG.UpdateMasks(self,Masks)
    760763        PlotImage(self)
     
    773776                    polygon.append([x0,y0])
    774777                    self.setPoly = False
    775                     self.G2plotNB.status.SetFields(['','Polygon closed: %.1f,%.1f'%(x0,y0)])
     778                    self.G2plotNB.status.SetFields(['','Polygon closed - RB drag a vertex to change shape'])
    776779                else:
    777                     self.G2plotNB.status.SetFields(['','Add polygon point: %.1f,%.1f'%(xpos,ypos)])
     780                    self.G2plotNB.status.SetFields(['','New polygon point: %.1f,%.1f'%(xpos,ypos)])
    778781                    polygon.append([xpos,ypos])
    779782                G2imG.UpdateMasks(self,Masks)
     
    10181021        for ipoly,polygon in enumerate(polygons):
    10191022            x,y = np.hsplit(np.array(polygon),2)
    1020             self.polyList.append([Plot.plot(x,y,'r',picker=3),ipoly])           
     1023            self.polyList.append([Plot.plot(x,y,'r+',picker=10),ipoly])
     1024            Plot.plot(x,y,'r')           
    10211025        colorBar = Page.figure.colorbar(Img)
    10221026        Plot.set_xlim(xlim)
  • trunk/GSASIIpwdGUI.py

    r179 r184  
    427427    parms.append(['Humidity',' Sample humidity: ','%.1f'])
    428428    parms.append(['Voltage',' Sample voltage: ','%.3f'])
    429     parms.append(['Force',' Sample force: ','%.3f'])
     429    parms.append(['Force',' Applied load: ','%.3f'])
    430430    objList = {}
    431431
Note: See TracChangeset for help on using the changeset viewer.