Changeset ea290ee in sasview


Ignore:
Timestamp:
Feb 13, 2009 1:14:13 PM (15 years ago)
Author:
Gervaise Alina <gervyh@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
9a585d0
Parents:
14d3495
Message:

edit color for detector

Location:
guiframe/local_perspectives/plotting
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • guiframe/local_perspectives/plotting/Plotter2D.py

    r0bd125d rea290ee  
    1111 
    1212import wx 
    13 import sys 
     13import sys, math 
    1414import pylab 
    1515 
     
    195195         
    196196        slicerpop.AppendSeparator() 
     197        id = wx.NewId() 
     198        slicerpop.Append(id, '&Edit Detector Parameters') 
     199        wx.EVT_MENU(self, id, self._onEditDetector)  
    197200         
    198201        id = wx.NewId() 
     
    255258        self.PopupMenu(slicerpop, pos) 
    256259         
    257      
    258          
     260    def _onEditDetector(self, event): 
     261        print "edit detortor param",self.zmin_2D, self.zmax_2D 
     262        import detector_dialog 
     263        dialog = detector_dialog.DetectorDialog(None, -1, "") 
     264        xnpts = len(self.data2D.x_bins) 
     265        ynpts = len(self.data2D.y_bins) 
     266        xmax = max(self.data2D.xmin, self.data2D.xmax) 
     267        ymax = max(self.data2D.ymin, self.data2D.ymax) 
     268        qmax = math.sqrt(math.pow(xmax,2)+math.pow(ymax,2)) 
     269        beam = self.data2D.xmin 
     270        zmin = self.zmin_2D 
     271        zmax = self.zmax_2D 
     272        dialog.setContent(xnpts=xnpts,ynpts=ynpts,qmax=qmax, 
     273                           beam=self.data2D.xmin, 
     274                           zmin = self.zmin_2D, 
     275                          zmax = self.zmax_2D) 
     276        if dialog.ShowModal() == wx.ID_OK: 
     277            evt = dialog.getContent() 
     278            self.zmin_2D = evt.zmin 
     279            self.zmax_2D = evt.zmax 
     280        
     281        dialog.Destroy() 
     282        print "zmn ,zmax", self.zmin_2D, self.zmax_2D 
     283        self.image(data= self.data2D.data, 
     284                   xmin= self.data2D.xmin, 
     285                   xmax= self.data2D.xmax, 
     286                   ymin= self.data2D.ymin, 
     287                   ymax= self.data2D.ymax, 
     288                   zmin= self.zmin_2D, 
     289                   zmax= self.zmax_2D, 
     290                   color=0,symbol=0,label='data2D') 
     291        #self.graph.render(self) 
     292        self.subplot.figure.canvas.draw_idle() 
    259293         
    260294    def get_corrected_data(self): 
     
    461495            wx.PostEvent(self, event) 
    462496           
    463     def _onEditDetector(self, event): 
    464         print "on parameter" 
    465          
     497   
    466498         
    467499    def _onToggleScale(self, event): 
  • guiframe/local_perspectives/plotting/boxSum.py

    r3b909b7 rea290ee  
    7373        # Bind to slice parameter events 
    7474        #print "box sum  self.base.parent",self.base.parent 
    75         self.base.parent.Bind(SlicerParameters.EVT_SLICER_PARS, self._onEVT_SLICER_PARS) 
     75        #self.base.parent.Bind(SlicerParameters.EVT_SLICER_PARS, self._onEVT_SLICER_PARS) 
    7676    def set_panel_name(self, name): 
    7777        self.panel_name= name 
Note: See TracChangeset for help on using the changeset viewer.