Changeset 3e5648b in sasview
- Timestamp:
- Apr 10, 2017 1:00:32 PM (8 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.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 6e6dd4c
- Parents:
- 6267876
- git-author:
- Jeff Krzywon <krzywon@…> (04/10/17 13:00:32)
- git-committer:
- krzywon <krzywon@…> (04/10/17 13:00:32)
- Location:
- src/sas
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/dataloader/manipulations.py
r7432acb r3e5648b 430 430 z_max = max(data2D.q_data) 431 431 z_min = min(data2D.q_data) 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]]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)] 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[ 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]]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)] 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
r7432acb r3e5648b 361 361 if self.slicer.__class__.__name__ != "BoxSum": 362 362 wx_id = ids.next() 363 slicerpop.Append(wx_id, '&Edit Slicer Parameters') 363 name = '&Edit Slicer Parameters and Batch Slicing' 364 slicerpop.Append(wx_id, name) 364 365 wx.EVT_MENU(self, wx_id, self._onEditSlicer) 365 366 slicerpop.AppendSeparator() … … 532 533 533 534 """ 534 # #Clear current slicer535 # Clear current slicer 535 536 if self.slicer is not None: 536 537 self.slicer.clear() 537 # #Create a new slicer538 # Create a new slicer 538 539 self.slicer_z += 1 539 540 self.slicer = slicer(self, self.subplot, zorder=self.slicer_z) 540 541 self.subplot.set_ylim(self.data2D.ymin, self.data2D.ymax) 541 542 self.subplot.set_xlim(self.data2D.xmin, self.data2D.xmax) 542 # #Draw slicer543 # Draw slicer 543 544 self.update() 544 545 self.slicer.update() … … 572 573 npt = math.floor(npt) 573 574 from sas.sascalc.dataloader.manipulations import CircularAverage 574 # #compute the maximum radius of data2D575 # compute the maximum radius of data2D 575 576 self.qmax = max(math.fabs(self.data2D.xmax), 576 577 math.fabs(self.data2D.xmin)) … … 578 579 math.fabs(self.data2D.ymin)) 579 580 self.radius = math.sqrt(math.pow(self.qmax, 2) + math.pow(self.ymax, 2)) 580 # #Compute beam width581 # Compute beam width 581 582 bin_width = (self.qmax + self.qmax) / npt 582 # #Create data1D circular average of data2D583 # Create data1D circular average of data2D 583 584 Circle = CircularAverage(r_min=0, r_max=self.radius, 584 585 bin_width=bin_width) … … 599 600 new_plot.name = "Circ avg " + self.data2D.name 600 601 new_plot.source = self.data2D.source 601 # new_plot.info = self.data2D.info602 # new_plot.info = self.data2D.info 602 603 new_plot.interactive = True 603 604 new_plot.detector = self.data2D.detector 604 605 605 # #If the data file does not tell us what the axes are, just assume...606 # If the data file does not tell us what the axes are, just assume... 606 607 new_plot.xaxis("\\rm{Q}", "A^{-1}") 607 608 if hasattr(self.data2D, "scale") and \ … … 615 616 new_plot.id = "Circ avg " + self.data2D.name 616 617 new_plot.is_data = True 617 self.parent.update_theory(data_id=self.data2D.id, \ 618 theory=new_plot) 618 self.parent.update_theory(data_id=self.data2D.id, 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 SlicerParametersimport SlicerParameterPanel632 from parameters_panel_slicer 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 slicerpanelimport SlicerPanel670 from parameters_panel_boxsum 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"761 760 if self.parent is not None: 762 761 self.parent.show_data2d(data, default_name) 763 762 764 763 def modifyGraphAppearance(self, e): 765 self.graphApp = graphAppearance(self, 'Modify graph appearance', legend=False) 764 self.graphApp = graphAppearance(self, 'Modify graph appearance', 765 legend=False) 766 766 self.graphApp.setDefaults(self.grid_on, self.legend_on, 767 767 self.xaxis_label, self.yaxis_label, -
src/sas/sasgui/guiframe/local_perspectives/plotting/parameters_panel_slicer.py
r3f75203 r3e5648b 14 14 15 15 FIT_OPTIONS = ["No fitting", "Fitting", "Batch Fitting"] 16 CONVERT_KEYS = ["SectorInteractor", "AnnulusInteractor", "BoxInteractorX", 17 "BoxInteractorY"] 16 18 CONVERT_DICT = {"SectorInteractor": "SectorQ", 17 19 "AnnulusInteractor": "AnnulusPhi", … … 138 140 self.bck.Add(text, (iy, ix), (1, 1), 139 141 wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15) 140 self.type_list = CONVERT_ DICT.keys()142 self.type_list = CONVERT_KEYS 141 143 self.type_select = wx.ComboBox(parent=self, choices=self.type_list) 142 144 self.type_select.Bind(wx.EVT_COMBOBOX, self.on_change_slicer) … … 331 333 Populate the check list from the currently plotted 2D data 332 334 """ 335 # Reinitialize loaded data list on redraw 336 self.loaded_data = [] 333 337 # Iterate over the loaded plots and find all 2D panels 334 338 for key, value in self.main_window.plot_panels.iteritems():
Note: See TracChangeset
for help on using the changeset viewer.