Ignore:
Timestamp:
Sep 24, 2018 8:17:36 AM (6 years ago)
Author:
rozyczko <piotr.rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
ee22241
Parents:
7879745
Message:

Set pointer to the correct set of data in batch fitting.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Perspectives/Fitting/FittingWidget.py

    r30bed93 r712db9e  
    24942494        fitted_data = self.logic.new1DPlot(return_data, self.tab_id) 
    24952495 
     2496        # assure the current index is set properly for batch 
     2497        if len(self._logic) > 1: 
     2498            for i, logic in enumerate(self._logic): 
     2499                if logic.data.name in fitted_data.name: 
     2500                    self.data_index = i 
     2501 
    24962502        residuals = self.calculateResiduals(fitted_data) 
    24972503        self.model_data = fitted_data 
     
    25582564 
    25592565        self.createNewIndex(weighted_data) 
     2566 
    25602567        # Calculate difference between return_data and logic.data 
    2561         self.chi2 = FittingUtilities.calculateChi2(weighted_data, self.logic.data) 
     2568        self.chi2 = FittingUtilities.calculateChi2(weighted_data, self.data) 
    25622569        # Update the control 
    25632570        chi2_repr = "---" if self.chi2 is None else GuiUtils.formatNumber(self.chi2, high=True) 
     
    25692576 
    25702577        residuals_plot = FittingUtilities.plotResiduals(self.data, weighted_data) 
     2578        if residuals_plot is None: 
     2579            return 
    25712580        residuals_plot.id = "Residual " + residuals_plot.id 
    25722581        residuals_plot.plot_role = Data1D.ROLE_RESIDUAL 
Note: See TracChangeset for help on using the changeset viewer.