Changes in / [9e2535e:7132e49] in sasview
- Location:
- src/sas/sasgui
- Files:
-
- 2 added
- 2 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter2D.py
r3e5648b r7432acb 361 361 if self.slicer.__class__.__name__ != "BoxSum": 362 362 wx_id = ids.next() 363 name = '&Edit Slicer Parameters and Batch Slicing' 364 slicerpop.Append(wx_id, name) 363 slicerpop.Append(wx_id, '&Edit Slicer Parameters') 365 364 wx.EVT_MENU(self, wx_id, self._onEditSlicer) 366 365 slicerpop.AppendSeparator() … … 533 532 534 533 """ 535 # Clear current slicer534 ## Clear current slicer 536 535 if self.slicer is not None: 537 536 self.slicer.clear() 538 # Create a new slicer537 ## Create a new slicer 539 538 self.slicer_z += 1 540 539 self.slicer = slicer(self, self.subplot, zorder=self.slicer_z) 541 540 self.subplot.set_ylim(self.data2D.ymin, self.data2D.ymax) 542 541 self.subplot.set_xlim(self.data2D.xmin, self.data2D.xmax) 543 # Draw slicer542 ## Draw slicer 544 543 self.update() 545 544 self.slicer.update() … … 573 572 npt = math.floor(npt) 574 573 from sas.sascalc.dataloader.manipulations import CircularAverage 575 # compute the maximum radius of data2D574 ## compute the maximum radius of data2D 576 575 self.qmax = max(math.fabs(self.data2D.xmax), 577 576 math.fabs(self.data2D.xmin)) … … 579 578 math.fabs(self.data2D.ymin)) 580 579 self.radius = math.sqrt(math.pow(self.qmax, 2) + math.pow(self.ymax, 2)) 581 # 580 ##Compute beam width 582 581 bin_width = (self.qmax + self.qmax) / npt 583 # Create data1D circular average of data2D582 ## Create data1D circular average of data2D 584 583 Circle = CircularAverage(r_min=0, r_max=self.radius, 585 584 bin_width=bin_width) … … 600 599 new_plot.name = "Circ avg " + self.data2D.name 601 600 new_plot.source = self.data2D.source 602 # 601 #new_plot.info = self.data2D.info 603 602 new_plot.interactive = True 604 603 new_plot.detector = self.data2D.detector 605 604 606 # If the data file does not tell us what the axes are, just assume...605 ## If the data file does not tell us what the axes are, just assume... 607 606 new_plot.xaxis("\\rm{Q}", "A^{-1}") 608 607 if hasattr(self.data2D, "scale") and \ … … 616 615 new_plot.id = "Circ avg " + self.data2D.name 617 616 new_plot.is_data = True 618 self.parent.update_theory(data_id=self.data2D.id, theory=new_plot) 617 self.parent.update_theory(data_id=self.data2D.id, \ 618 theory=new_plot) 619 619 wx.PostEvent(self.parent, 620 620 NewPlotEvent(plot=new_plot, title=new_plot.name)) … … 630 630 """ 631 631 if self.slicer is not None: 632 from parameters_panel_slicerimport SlicerParameterPanel632 from SlicerParameters import SlicerParameterPanel 633 633 dialog = SlicerParameterPanel(self, -1, "Slicer Parameters") 634 634 dialog.set_slicer(self.slicer.__class__.__name__, … … 668 668 params = self.slicer.get_params() 669 669 ## Create a new panel to display results of summation of Data2D 670 from parameters_panel_boxsumimport SlicerPanel670 from slicerpanel import SlicerPanel 671 671 win = MDIFrame(self.parent, None, 'None', (100, 200)) 672 672 new_panel = SlicerPanel(parent=win, id=-1, … … 758 758 if default_name.count('.') > 0: 759 759 default_name = default_name.split('.')[0] 760 #default_name += "_out" 760 761 if self.parent is not None: 761 762 self.parent.show_data2d(data, default_name) 762 763 763 764 def modifyGraphAppearance(self, e): 764 self.graphApp = graphAppearance(self, 'Modify graph appearance', 765 legend=False) 765 self.graphApp = graphAppearance(self, 'Modify graph appearance', legend=False) 766 766 self.graphApp.setDefaults(self.grid_on, self.legend_on, 767 767 self.xaxis_label, self.yaxis_label, -
src/sas/sasgui/perspectives/fitting/basepage.py
ra1b8fee ra1b8fee 254 254 if not hasattr(self, "model_view"): 255 255 return 256 toggle_mode_on = self.model_view.IsEnabled() or self.data is None256 toggle_mode_on = self.model_view.IsEnabled() 257 257 if toggle_mode_on: 258 258 if self.enable2D and not check_data_validity(self.data):
Note: See TracChangeset
for help on using the changeset viewer.