Changeset 712db9e in sasview for src


Ignore:
Timestamp:
Sep 24, 2018 6: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.

Location:
src/sas/qtgui
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/GUITests.py

    rccd2b87 r712db9e  
    211211                print("\nAll tests successful") 
    212212 
    213         except KeyError: 
     213        except KeyError as ex: 
    214214            print("Failure : %s "%str(ex)) 
    215215            print("ERROR: Incorrect suite name: %s " % suite) 
  • src/sas/qtgui/Perspectives/Fitting/FittingUtilities.py

    r30bed93 r712db9e  
    549549                      "Data2D": residualsData2D} 
    550550 
    551     residuals = residuals_dict[method_name](reference_data, data_copy) 
     551    try: 
     552        residuals = residuals_dict[method_name](reference_data, data_copy) 
     553    except ValueError: 
     554        return None 
    552555 
    553556    theory_name = str(current_data.name.split()[0]) 
  • 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 
  • src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingWidgetTest.py

    r8faac15 r712db9e  
    393393 
    394394        # Test tooltips 
    395         self.assertEqual(len(self.widget._poly_model.header_tooltips), 9) 
     395        self.assertEqual(len(self.widget._poly_model.header_tooltips), 8) 
    396396 
    397397        header_tooltips = ['Select parameter for fitting', 
     
    702702        # Force same data into logic 
    703703        self.widget.data = item 
     704 
    704705        category_index = self.widget.cbCategory.findText("Sphere") 
    705706        self.widget.cbCategory.setCurrentIndex(category_index) 
    706  
    707         self.widget.show() 
    708707 
    709708        # Test no fitting params 
Note: See TracChangeset for help on using the changeset viewer.