- Timestamp:
- Sep 24, 2018 8:17:36 AM (6 years ago)
- 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
- Location:
- src/sas/qtgui
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/GUITests.py
rccd2b87 r712db9e 211 211 print("\nAll tests successful") 212 212 213 except KeyError :213 except KeyError as ex: 214 214 print("Failure : %s "%str(ex)) 215 215 print("ERROR: Incorrect suite name: %s " % suite) -
src/sas/qtgui/Perspectives/Fitting/FittingUtilities.py
r30bed93 r712db9e 549 549 "Data2D": residualsData2D} 550 550 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 552 555 553 556 theory_name = str(current_data.name.split()[0]) -
src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
r30bed93 r712db9e 2494 2494 fitted_data = self.logic.new1DPlot(return_data, self.tab_id) 2495 2495 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 2496 2502 residuals = self.calculateResiduals(fitted_data) 2497 2503 self.model_data = fitted_data … … 2558 2564 2559 2565 self.createNewIndex(weighted_data) 2566 2560 2567 # 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) 2562 2569 # Update the control 2563 2570 chi2_repr = "---" if self.chi2 is None else GuiUtils.formatNumber(self.chi2, high=True) … … 2569 2576 2570 2577 residuals_plot = FittingUtilities.plotResiduals(self.data, weighted_data) 2578 if residuals_plot is None: 2579 return 2571 2580 residuals_plot.id = "Residual " + residuals_plot.id 2572 2581 residuals_plot.plot_role = Data1D.ROLE_RESIDUAL -
src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingWidgetTest.py
r8faac15 r712db9e 393 393 394 394 # Test tooltips 395 self.assertEqual(len(self.widget._poly_model.header_tooltips), 9)395 self.assertEqual(len(self.widget._poly_model.header_tooltips), 8) 396 396 397 397 header_tooltips = ['Select parameter for fitting', … … 702 702 # Force same data into logic 703 703 self.widget.data = item 704 704 705 category_index = self.widget.cbCategory.findText("Sphere") 705 706 self.widget.cbCategory.setCurrentIndex(category_index) 706 707 self.widget.show()708 707 709 708 # Test no fitting params
Note: See TracChangeset
for help on using the changeset viewer.