Changeset da8f4c8 in sasview for sansguiframe/src


Ignore:
Timestamp:
Apr 18, 2012 10:06:31 AM (13 years ago)
Author:
Mathieu Doucet <doucetm@…>
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:
bc2db41
Parents:
1a7207b
Message:

Fixing code style problems

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansguiframe/src/sans/guiframe/local_perspectives/plotting/detector_dialog.py

    r079072e rda8f4c8  
    1 #!/usr/bin/env python 
    2  
    3 # version 
    4 __id__ = "$Id: aboutdialog.py 1193 2007-05-03 17:29:59Z dmitriy $" 
    5 __revision__ = "$Revision: 1193 $" 
    6  
     1""" 
     2    Widget to display a 2D map of the detector 
     3""" 
    74import wx 
    85import sys 
    96from sans.guiframe.utils import format_number 
    107from sans.guiframe.events import StatusEvent  
    11 from sans.guiframe.events import NewPlotEvent 
    12  
    13 import matplotlib  
    148from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as Canvas 
    15 from matplotlib import pyplot 
    169from matplotlib import mpl 
    1710from matplotlib import pylab 
     
    263256         
    264257        wx.EVT_COMBOBOX(self.cmap_selector, -1, self._on_select_cmap) 
    265         sizer_selection.Add(wx.StaticText(self, -1,"Select Cmap: "), 0, 
     258        sizer_selection.Add(wx.StaticText(self, -1, "Select Cmap: "), 0, 
    266259                             wx.LEFT|wx.ADJUST_MINSIZE, 5)  
    267260        sizer_selection.Add(self.cmap_selector, 0, wx.EXPAND|wx.ALL, 10) 
     
    295288                                     norm=self.norm, orientation='horizontal') 
    296289        self.canvas.draw() 
    297  
    298  
    299 # end of class DialogAbout 
    300  
    301 ##### testing code ############################################################ 
    302 class MyApp(wx.App): 
    303     def OnInit(self): 
    304         wx.InitAllImageHandlers() 
    305         dialog = DetectorDialog(None, -1, "") 
    306         self.SetTopWindow(dialog) 
    307         dialog.setContent(xnpts=128, ynpts=128, qmax=20, 
    308                            beam=20, zmin=2, zmax=60, sym=False) 
    309         print dialog.ShowModal() 
    310         evt = dialog.getContent() 
    311         if hasattr(evt, "npts"): 
    312             print "number of point: ", evt.npts 
    313         if hasattr(evt,"qmax"):  
    314             print "qmax: ", evt.qmax 
    315         dialog.Destroy() 
    316         return 1 
    317  
    318 # end of class MyApp 
    319  
    320 if __name__ == "__main__": 
    321     app = MyApp(0) 
    322     app.MainLoop() 
    323          
Note: See TracChangeset for help on using the changeset viewer.