Changeset 7d077d1 in sasview for src/sas/qtgui/Perspectives/Fitting
- Timestamp:
- Mar 31, 2017 3:29:50 AM (8 years ago)
- Branches:
- 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
- Children:
- 0274aea
- Parents:
- 0268aed
- Location:
- src/sas/qtgui/Perspectives/Fitting
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/FittingLogic.py
r0268aed r7d077d1 103 103 self._data.ymax = ymax 104 104 105 def new1DPlot(self, return_data ):105 def new1DPlot(self, return_data, tab_id): 106 106 """ 107 107 Create a new 1D data instance based on fitting results … … 121 121 122 122 new_plot.group_id = data.group_id 123 #new_plot.id = str(self.tab_id) + " " + data.name123 new_plot.id = str(tab_id) + " " + data.name 124 124 new_plot.name = model.name + " [" + data.name + "]" 125 125 new_plot.title = new_plot.name … … 135 135 Create a new 2D data instance based on fitting results 136 136 """ 137 138 137 image, data, page_id, model, state, toggle_mode_on,\ 139 138 elapsed, index, fid, qmin, qmax, weight, \ -
src/sas/qtgui/Perspectives/Fitting/FittingUtilities.py
r0268aed r7d077d1 224 224 def residualsData1D(reference_data, current_data): 225 225 """ 226 Calculate the residuals for difference of two Data1D sets 226 227 """ 227 228 # temporary default values for index and weight … … 265 266 def residualsData2D(reference_data, current_data): 266 267 """ 268 Calculate the residuals for difference of two Data2D sets 267 269 """ 268 270 # temporary default values for index and weight … … 304 306 data_copy = deepcopy(current_data) 305 307 # Get data: data I, theory I, and data dI in order 306 307 308 method_name = current_data.__class__.__name__ 308 309 residuals_dict = {"Data1D": residualsData1D, -
src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
r0268aed r7d077d1 586 586 # multishell params in self.kernel_module.details[??] = value 587 587 588 # Force the chart update 589 self.onPlot() 590 588 591 def nameForFittedData(self, name): 589 592 """ … … 605 608 fitted_data.name = name 606 609 fitted_data.filename = name 610 fitted_data.symbol = "Line" 607 611 self.updateModelIndex(fitted_data) 608 612 else: … … 625 629 name = fitted_data.name 626 630 # Make this a line if no other defined 627 if fitted_data.symbol is None:631 if hasattr(fitted_data, 'symbol') and fitted_data.symbol is None: 628 632 fitted_data.symbol = 'Line' 629 633 # Notify the GUI manager so it can update the main model in DataExplorer 630 634 GuiUtils.updateModelItemWithPlot(self._index, QtCore.QVariant(fitted_data), name) 635 # Force redisplay 631 636 632 637 def createTheoryIndex(self, fitted_data): … … 680 685 Plot the current 1D data 681 686 """ 682 fitted_plot = self.logic.new1DPlot(return_data )687 fitted_plot = self.logic.new1DPlot(return_data, self.tab_id) 683 688 self.calculateResiduals(fitted_plot) 684 689 … … 695 700 """ 696 701 # Create a new index for holding data 702 fitted_data.symbol = "Line" 697 703 self.createNewIndex(fitted_data) 698 704 # Calculate difference between return_data and logic.data … … 704 710 if self.data_is_loaded: 705 711 residuals_plot = FittingUtilities.plotResiduals(self.data, fitted_data) 712 residuals_plot.id = "Residual " + residuals_plot.id 706 713 self.createNewIndex(residuals_plot) 714 715 self.communicate.plotUpdateSignal.emit([fitted_data]) 707 716 708 717 def calcException(self, etype, value, tb):
Note: See TracChangeset
for help on using the changeset viewer.