Changeset 6d920cd in sasview
- Timestamp:
- Feb 27, 2009 8:52:28 PM (16 years ago)
- 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:
- ed2ea6a
- Parents:
- 8dddbd4
- Location:
- guiframe
- Files:
-
- 2 added
- 3 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/data_loader.py
r8bd764d r6d920cd 1 import os, sys 1 import os, sys,numpy 2 2 import wx 3 3 from dataFitting import Data1D, Theory1D … … 28 28 Load a 1D ascii file, with errors 29 29 """ 30 import numpy31 30 if path and os.path.isfile(path): 32 31 … … 63 62 return None, None, None 64 63 65 def plot_data(parent, path, name="Loaded Data"): 64 def plot_data(parent, path): 65 """ 66 Use the DataLoader loader to created data to plot. 67 @param path: the path of the data to load 68 """ 66 69 from sans.guicomm.events import NewPlotEvent, StatusEvent 67 68 70 from DataLoader.loader import Loader 69 import numpy71 70 72 #Instantiate a loader 71 73 L = Loader() … … 98 100 new_plot.x_bins=output.x_bins 99 101 new_plot.y_bins=output.y_bins 100 #print "data_loader",output101 102 else: 102 #print "output.dx, output.dy",output.dx, output.dy103 103 104 if output.dy ==None : 104 105 new_plot = Theory1D(output.x,output.y, dxl, dxw) … … 109 110 new_plot = Theory1D(output.x,output.y,output.dy, dxl, dxw) 110 111 else: 111 112 112 new_plot = Data1D(x=output.x,y=output.y,dx=output.dx,dy=output.dy, dxl=dxl, dxw=dxw) 113 113 if output.filename==None: 114 output.filename=str(filename) 114 115 new_plot.source=output.source 115 116 new_plot.name = output.filename … … 121 122 if hasattr(output, "dxw"): 122 123 new_plot.dxw = output.dxw 123 #print "loader output.detector",output.source124 124 new_plot.detector =output.detector 125 125 … … 151 151 152 152 new_plot.source=item.source 153 #new_plot.info=output154 153 new_plot.name = str(item.run[0]) 155 154 new_plot.interactive = True 156 157 #print "loader output.detector",output.source158 155 new_plot.detector =item.detector 159 156 # If the data file does not tell us what the axes are, just assume... … … 162 159 new_plot.group_id = str(item.run[0]) 163 160 new_plot.id = str(item.run[0]) 161 new_plot.info= item 162 164 163 if hasattr(item,"title"): 165 164 title= item.title -
guiframe/gui_manager.py
r700f9b4 r6d920cd 35 35 import config 36 36 37 from sans.guicomm.events import EVT_STATUS ,Model2DPanelEvent37 from sans.guicomm.events import EVT_STATUS 38 38 from sans.guicomm.events import EVT_NEW_PLOT,EVT_SLICER_PARS_UPDATE 39 39 import history … … 224 224 self.defaultPanel = DefaultPanel(self, -1, style=wx.RAISED_BORDER) 225 225 226 # History panel227 #self.histPanel = history.HistoryPanel(self, style=wx.RAISED_BORDER)228 # self.build_gui()229 226 230 227 # Register the close event so it calls our own method … … 297 294 """ 298 295 import imp 299 print "Looking for plug-ins in %s" % dir296 #print "Looking for plug-ins in %s" % dir 300 297 # List of plug-in objects 301 298 … … 368 365 # It also sets the size of the application windows 369 366 self.panels["default"] = self.defaultPanel 370 # History panel371 #self.panels["historyPanel"] = self.histPanel372 367 373 368 self._mgr.AddPane(self.defaultPanel, wx.aui.AuiPaneInfo(). … … 378 373 MinSize(wx.Size(self._window_width, self._window_height)). 379 374 Show()) 380 """ 381 self._mgr.AddPane(self.histPanel, wx.aui.AuiPaneInfo(). 382 Name("historyPanel").Caption("History"). 383 #Float(). 384 Bottom(). 385 Dock(). 386 TopDockable(). 387 BottomDockable(). 388 LeftDockable(). 389 RightDockable(). 390 MinimizeButton(). 391 Hide(). 392 #Show(). 393 BestSize(wx.Size(500,600)). 394 MinSize(wx.Size(200,150))) 395 """ 375 396 376 397 377 # Add the panels to the AUI manager … … 410 390 BestSize(wx.Size(600,600)). 411 391 MinSize(wx.Size(400,400)). 412 #BestSize(wx.Size(500,500)).413 #MinSize(wx.Size(200,200)).414 392 Hide()) 415 393 … … 418 396 self._mgr.AddPane(p, wx.aui.AuiPaneInfo(). 419 397 Name(p.window_name).Caption(p.window_caption). 420 #Floatable().421 #Float().422 398 Right(). 423 399 Dock(). … … 428 404 MinimizeButton(). 429 405 Hide(). 430 #Show().431 406 BestSize(wx.Size(600,600)). 432 407 MinSize(wx.Size(500,500))) 433 #BestSize(wx.Size(400,400)). 434 #MinSize(wx.Size(300,300))) 408 435 409 436 410 … … 516 490 filemenu.Append(id, '&Open', 'Open a file') 517 491 wx.EVT_MENU(self, id, self._on_open) 518 519 #id = wx.NewId() 520 #filemenu.Append(id, '&History', 'Register previous States') 521 #wx.EVT_MENU(self, id, self._onHistoryPanel) 522 492 523 493 id = wx.NewId() 524 494 filemenu.Append(id,'&Quit', 'Exit') … … 652 622 653 623 self._mgr.Update() 654 """ 655 def _onHistoryPanel(self, event): 656 print "on history" 657 if not self._mgr.GetPane("historyPanel").IsShown(): 658 self._mgr.GetPane("historyPanel").Show() 659 self._mgr.Update() 660 return 661 """ 624 662 625 def _on_open(self, event): 663 626 -
guiframe/local_perspectives/plotting/AnnulusSlicer.py
r18eba35 r6d920cd 122 122 rmax = max(math.fabs(self.inner_circle.get_radius()), 123 123 math.fabs(self.outer_circle.get_radius())) 124 print "rmin, rmax", rmin, rmax124 #print "rmin, rmax", rmin, rmax 125 125 if nbins==None: 126 126 nbins = 20 -
guiframe/local_perspectives/plotting/Plotter1D.py
r8bd764d r6d920cd 263 263 slicerpop.Append(id, '&Reset Graph') 264 264 wx.EVT_MENU(self, id, self.onResetGraph) 265 """ 266 slicerpop.AppendSeparator() 267 id = wx.NewId() 268 slicerpop.Append(id,'&Printer setup', 'Set image size') 269 wx.EVT_MENU(self, id, self.onPrinterSetup) 270 271 id = wx.NewId() 272 slicerpop.Append(id,'&Printer Preview', 'Set image size') 273 wx.EVT_MENU(self, id, self.onPrinterPreview) 274 """ 265 275 266 276 267 -
guiframe/local_perspectives/plotting/Plotter2D.py
r8bd764d r6d920cd 93 93 94 94 def _onEVT_SLICER_PARS(self, event): 95 print "paramaters entered on slicer panel", event.type, event.params95 #print "paramaters entered on slicer panel", event.type, event.params 96 96 self.slicer.set_params(event.params) 97 97 #from sans.guicomm.events import SlicerPanelEvent … … 247 247 slicerpop.AppendSeparator() 248 248 249 """ 250 # Option to save the data displayed 251 id = wx.NewId() 252 slicerpop.Append(id,'&Printer setup', 'Set image size') 253 wx.EVT_MENU(self, id, self.onPrinterSetup) 254 255 256 """ 249 257 250 id = wx.NewId() 258 251 slicerpop.Append(id, '&Toggle Linear/Log scale') … … 265 258 266 259 def _onEditDetector(self, event): 267 print "edit detortor param",self.zmin_2D, self.zmax_2D 260 """ 261 """ 262 #print "edit detortor param",self.zmin_2D, self.zmax_2D 268 263 import detector_dialog 269 264 dialog = detector_dialog.DetectorDialog(self, -1,base=self.parent) … … 286 281 287 282 dialog.Destroy() 288 print "zmn ,zmax", self.zmin_2D, self.zmax_2D283 #print "zmn ,zmax", self.zmin_2D, self.zmax_2D 289 284 self.image(data= self.data2D.data, 290 285 xmin= self.data2D.xmin, -
guiframe/local_perspectives/plotting/boxSum.py
r18eba35 r6d920cd 74 74 #print "box sum self.base.parent",self.base.parent 75 75 self.base.Bind(EVT_SLICER_PARS, self._onEVT_SLICER_PARS) 76 76 77 def set_panel_name(self, name): 77 78 self.panel_name= name 79 80 78 81 def _onEVT_SLICER_PARS(self, event): 79 82 wx.PostEvent(self.base.parent, StatusEvent(status="Boxsum._onEVT_SLICER_PARS")) 80 print "receiving value ",event.params83 #print "receiving value ",event.params 81 84 event.Skip() 82 85 if event.type == self.__class__.__name__: … … 157 160 y_min= self.vertical_lines.y2 158 161 y_max= self.vertical_lines.y1 159 print "xmin, xmax, ymin , ymax", x_min, x_max, y_min, y_max162 #print "xmin, xmax, ymin , ymax", x_min, x_max, y_min, y_max 160 163 box = Boxavg (x_min=x_min, x_max=x_max, y_min=y_min, y_max=y_max) 161 164 self.count, self.error = box(self.base.data2D) 162 print "box_sum output",box(self.base.data2D)165 #print "box_sum output",box(self.base.data2D) 163 166 164 167 def moveend(self, ev): -
guiframe/local_perspectives/plotting/plotting.py
r50cbace r6d920cd 108 108 is_available = True 109 109 110 111 110 panel._onEVT_1DREPLOT(event) 112 111 self.parent.show_panel(panel.uid) 113 print "went here for replottiing", event.plot.name112 #print "went here for replottiing", event.plot.name 114 113 115 114 else: … … 125 124 from Plotter1D import ModelPanel1D 126 125 if hasattr(event.plot,"xtransform"): 127 print "went here"126 #print "went here" 128 127 xtransform = event.plot.xtransform 129 128 else: -
guiframe/model_thread.py
r700f9b4 r6d920cd 163 163 "Error computing %s at [%g,%g]" %(self.model.name, self.x[i_x],self.y[i_y]))) 164 164 pass 165 print "model thread ouput",output165 #print "model thread ouput",output 166 166 elapsed = time.time()-self.starttime 167 167 self.complete(
Note: See TracChangeset
for help on using the changeset viewer.