Changes in / [1661cd5:7cbbacd] in sasview
- Location:
- src/sas/sasgui/guiframe/local_perspectives/plotting
- Files:
-
- 2 added
- 2 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter2D.py
rdfa1579 rb2b36932 359 359 if self.slicer.__class__.__name__ != "BoxSum": 360 360 wx_id = ids.next() 361 name = '&Edit Slicer Parameters and Batch Slicing' 362 slicerpop.Append(wx_id, name) 361 slicerpop.Append(wx_id, '&Edit Slicer Parameters') 363 362 wx.EVT_MENU(self, wx_id, self._onEditSlicer) 364 363 slicerpop.AppendSeparator() … … 531 530 532 531 """ 533 # Clear current slicer532 ## Clear current slicer 534 533 if not self.slicer == None: 535 534 self.slicer.clear() 536 # Create a new slicer535 ## Create a new slicer 537 536 self.slicer_z += 1 538 537 self.slicer = slicer(self, self.subplot, zorder=self.slicer_z) 539 538 self.subplot.set_ylim(self.data2D.ymin, self.data2D.ymax) 540 539 self.subplot.set_xlim(self.data2D.xmin, self.data2D.xmax) 541 # Draw slicer540 ## Draw slicer 542 541 self.update() 543 542 self.slicer.update() … … 571 570 npt = math.floor(npt) 572 571 from sas.sascalc.dataloader.manipulations import CircularAverage 573 # compute the maximum radius of data2D572 ## compute the maximum radius of data2D 574 573 self.qmax = max(math.fabs(self.data2D.xmax), 575 574 math.fabs(self.data2D.xmin)) … … 577 576 math.fabs(self.data2D.ymin)) 578 577 self.radius = math.sqrt(math.pow(self.qmax, 2) + math.pow(self.ymax, 2)) 579 # 578 ##Compute beam width 580 579 bin_width = (self.qmax + self.qmax) / npt 581 # Create data1D circular average of data2D580 ## Create data1D circular average of data2D 582 581 Circle = CircularAverage(r_min=0, r_max=self.radius, 583 582 bin_width=bin_width) … … 598 597 new_plot.name = "Circ avg " + self.data2D.name 599 598 new_plot.source = self.data2D.source 600 # 599 #new_plot.info = self.data2D.info 601 600 new_plot.interactive = True 602 601 new_plot.detector = self.data2D.detector 603 602 604 # If the data file does not tell us what the axes are, just assume...603 ## If the data file does not tell us what the axes are, just assume... 605 604 new_plot.xaxis("\\rm{Q}", "A^{-1}") 606 605 if hasattr(self.data2D, "scale") and \ … … 614 613 new_plot.id = "Circ avg " + self.data2D.name 615 614 new_plot.is_data = True 616 self.parent.update_theory(data_id=self.data2D.id, theory=new_plot) 615 self.parent.update_theory(data_id=self.data2D.id, \ 616 theory=new_plot) 617 617 wx.PostEvent(self.parent, 618 618 NewPlotEvent(plot=new_plot, title=new_plot.name)) … … 627 627 628 628 """ 629 if self.slicer is notNone:630 from parameters_panel_slicerimport SlicerParameterPanel629 if self.slicer != None: 630 from SlicerParameters import SlicerParameterPanel 631 631 dialog = SlicerParameterPanel(self, -1, "Slicer Parameters") 632 632 dialog.set_slicer(self.slicer.__class__.__name__, … … 666 666 params = self.slicer.get_params() 667 667 ## Create a new panel to display results of summation of Data2D 668 from parameters_panel_boxsumimport SlicerPanel668 from slicerpanel import SlicerPanel 669 669 win = MDIFrame(self.parent, None, 'None', (100, 200)) 670 670 new_panel = SlicerPanel(parent=win, id=-1, … … 717 717 Clear the slicer on the plot 718 718 """ 719 if self.slicer is notNone:719 if not self.slicer == None: 720 720 self.slicer.clear() 721 721 self.subplot.figure.canvas.draw() … … 733 733 """ 734 734 event_id = str(evt.GetId()) 735 if self.parent is notNone:735 if self.parent != None: 736 736 self._default_save_location = self.parent._default_save_location 737 737 default_name = self.plots[self.graph.selected_plottable].label … … 756 756 if default_name.count('.') > 0: 757 757 default_name = default_name.split('.')[0] 758 if self.parent is not None: 758 #default_name += "_out" 759 if self.parent != None: 759 760 self.parent.show_data2d(data, default_name) 760 761 761 762 def modifyGraphAppearance(self, e): 762 self.graphApp = graphAppearance(self, 'Modify graph appearance', 763 legend=False) 763 self.graphApp = graphAppearance(self, 'Modify graph appearance', legend=False) 764 764 self.graphApp.setDefaults(self.grid_on, self.legend_on, 765 765 self.xaxis_label, self.yaxis_label,
Note: See TracChangeset
for help on using the changeset viewer.