Changes in / [6e6dd4c:e5cbbce] in sasview
- Location:
- src/sas
- Files:
-
- 2 added
- 2 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/dataloader/manipulations.py
r3e5648b r7432acb 430 430 z_max = max(data2D.q_data) 431 431 z_min = min(data2D.q_data) 432 x_max = data2D.dqx_data[ numpy.where(data2D.q_data == z_max)]433 x_min = data2D.dqx_data[ numpy.where(data2D.q_data == z_min)]434 y_max = data2D.dqy_data[ numpy.where(data2D.q_data == z_max)]435 y_min = data2D.dqy_data[ numpy.where(data2D.q_data == z_min)]432 x_max = data2D.dqx_data[data2D.q_data[z_max]] 433 x_min = data2D.dqx_data[data2D.q_data[z_min]] 434 y_max = data2D.dqy_data[data2D.q_data[z_max]] 435 y_min = data2D.dqy_data[data2D.q_data[z_min]] 436 436 # Find qdx at q = 0 437 437 dq_overlap_x = (x_min * z_max - x_max * z_min) / (z_max - z_min) … … 785 785 z_max = max(data2D.q_data) 786 786 z_min = min(data2D.q_data) 787 x_max = data2D.dqx_data[ numpy.where(data2D.q_data == z_max)]788 x_min = data2D.dqx_data[ numpy.where(data2D.q_data == z_min)]789 y_max = data2D.dqy_data[ numpy.where(data2D.q_data == z_max)]790 y_min = data2D.dqy_data[ numpy.where(data2D.q_data == z_min)]787 x_max = data2D.dqx_data[data2D.q_data[z_max]] 788 x_min = data2D.dqx_data[data2D.q_data[z_min]] 789 y_max = data2D.dqy_data[data2D.q_data[z_max]] 790 y_min = data2D.dqy_data[data2D.q_data[z_min]] 791 791 # Find qdx at q = 0 792 792 dq_overlap_x = (x_min * z_max - x_max * z_min) / (z_max - z_min) -
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
rac0578c r463e7ffc 252 252 if not hasattr(self, "model_view"): 253 253 return 254 toggle_mode_on = self.model_view.IsEnabled() or self.data is None254 toggle_mode_on = self.model_view.IsEnabled() 255 255 if toggle_mode_on: 256 256 if self.enable2D and not check_data_validity(self.data):
Note: See TracChangeset
for help on using the changeset viewer.