Changes in / [7cbbacd:1661cd5] 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
rb2b36932 rdfa1579 359 359 if self.slicer.__class__.__name__ != "BoxSum": 360 360 wx_id = ids.next() 361 slicerpop.Append(wx_id, '&Edit Slicer Parameters') 361 name = '&Edit Slicer Parameters and Batch Slicing' 362 slicerpop.Append(wx_id, name) 362 363 wx.EVT_MENU(self, wx_id, self._onEditSlicer) 363 364 slicerpop.AppendSeparator() … … 530 531 531 532 """ 532 # #Clear current slicer533 # Clear current slicer 533 534 if not self.slicer == None: 534 535 self.slicer.clear() 535 # #Create a new slicer536 # Create a new slicer 536 537 self.slicer_z += 1 537 538 self.slicer = slicer(self, self.subplot, zorder=self.slicer_z) 538 539 self.subplot.set_ylim(self.data2D.ymin, self.data2D.ymax) 539 540 self.subplot.set_xlim(self.data2D.xmin, self.data2D.xmax) 540 # #Draw slicer541 # Draw slicer 541 542 self.update() 542 543 self.slicer.update() … … 570 571 npt = math.floor(npt) 571 572 from sas.sascalc.dataloader.manipulations import CircularAverage 572 # #compute the maximum radius of data2D573 # compute the maximum radius of data2D 573 574 self.qmax = max(math.fabs(self.data2D.xmax), 574 575 math.fabs(self.data2D.xmin)) … … 576 577 math.fabs(self.data2D.ymin)) 577 578 self.radius = math.sqrt(math.pow(self.qmax, 2) + math.pow(self.ymax, 2)) 578 # #Compute beam width579 # Compute beam width 579 580 bin_width = (self.qmax + self.qmax) / npt 580 # #Create data1D circular average of data2D581 # Create data1D circular average of data2D 581 582 Circle = CircularAverage(r_min=0, r_max=self.radius, 582 583 bin_width=bin_width) … … 597 598 new_plot.name = "Circ avg " + self.data2D.name 598 599 new_plot.source = self.data2D.source 599 # new_plot.info = self.data2D.info600 # new_plot.info = self.data2D.info 600 601 new_plot.interactive = True 601 602 new_plot.detector = self.data2D.detector 602 603 603 # #If the data file does not tell us what the axes are, just assume...604 # If the data file does not tell us what the axes are, just assume... 604 605 new_plot.xaxis("\\rm{Q}", "A^{-1}") 605 606 if hasattr(self.data2D, "scale") and \ … … 613 614 new_plot.id = "Circ avg " + self.data2D.name 614 615 new_plot.is_data = True 615 self.parent.update_theory(data_id=self.data2D.id, \ 616 theory=new_plot) 616 self.parent.update_theory(data_id=self.data2D.id, 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 !=None:630 from SlicerParametersimport SlicerParameterPanel629 if self.slicer is not None: 630 from parameters_panel_slicer 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 slicerpanelimport SlicerPanel668 from parameters_panel_boxsum 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 not self.slicer ==None:719 if self.slicer is not 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 !=None:735 if self.parent is not 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 #default_name += "_out" 759 if self.parent != None: 758 if self.parent is not None: 760 759 self.parent.show_data2d(data, default_name) 761 760 762 761 def modifyGraphAppearance(self, e): 763 self.graphApp = graphAppearance(self, 'Modify graph appearance', legend=False) 762 self.graphApp = graphAppearance(self, 'Modify graph appearance', 763 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.