Changeset fa3da01 in sasview for src/sas/qtgui/Perspectives/Fitting
- Timestamp:
- Sep 9, 2018 5:01:08 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:
- 6fbb859
- Parents:
- e4041a2 (diff), bb477f5 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Location:
- src/sas/qtgui/Perspectives/Fitting
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
re4041a2 rfa3da01 569 569 menu.exec_(self.lstParams.viewport().mapToGlobal(position)) 570 570 except AttributeError as ex: 571 logg ing.error("Error generating context menu: %s" % ex)571 logger.error("Error generating context menu: %s" % ex) 572 572 return 573 573 … … 1456 1456 self.communicate.statusBarUpdateSignal.emit(msg) 1457 1457 msg += results.mesg 1458 logg ing.error(msg)1458 logger.error(msg) 1459 1459 return 1460 1460 … … 1499 1499 if self.calc_fit._interrupting: 1500 1500 msg = "Fitting cancelled by user after: %s s." % GuiUtils.formatNumber(elapsed) 1501 logg ing.warning("\n"+msg+"\n")1501 logger.warning("\n"+msg+"\n") 1502 1502 else: 1503 1503 msg = "Fitting completed successfully in: %s s." % GuiUtils.formatNumber(elapsed) … … 2052 2052 kernel_module = generate.load_kernel_module(name) 2053 2053 except ModuleNotFoundError as ex: 2054 logg ing.error("Can't find the model "+ str(ex))2054 logger.error("Can't find the model "+ str(ex)) 2055 2055 return 2056 2056 … … 2610 2610 """ 2611 2611 # TODO: remimplement thread cancellation 2612 logg ing.error("".join(traceback.format_exception(etype, value, tb)))2612 logger.error("".join(traceback.format_exception(etype, value, tb))) 2613 2613 2614 2614 def setTableProperties(self, table): … … 2792 2792 2793 2793 if not datafile: 2794 logg ing.info("No weight data chosen.")2794 logger.info("No weight data chosen.") 2795 2795 raise IOError 2796 2796 … … 2908 2908 self._n_shells_row = shell_row - 1 2909 2909 2910 # Set the index to the state-kept value 2911 func.setCurrentIndex(self.current_shell_displayed 2912 if self.current_shell_displayed < func.count() else 0) 2910 # Get the default number of shells for the model 2911 kernel_pars = self.kernel_module._model_info.parameters.kernel_parameters 2912 shell_par = None 2913 for par in kernel_pars: 2914 if par.name == param_name: 2915 shell_par = par 2916 break 2917 if not shell_par: 2918 logger.error("Could not find %s in kernel parameters.", param_name) 2919 default_shell_count = shell_par.default 2920 2921 # Add default number of shells to the model 2922 func.setCurrentIndex(default_shell_count) 2913 2923 2914 2924 def modifyShellsInList(self, index): -
src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingWidgetTest.py
r4ea8020 rf712bf30 613 613 614 614 # Check that the number of rows increased 615 # (note that n == 1 by default in core_multi_shell so this increases index by 2) 615 616 more_rows = self.widget._model_model.rowCount() - last_row 616 self.assertEqual(more_rows, 6) # 6new rows: 2 params per index617 618 # Backto 0617 self.assertEqual(more_rows, 4) # 4 new rows: 2 params per index 618 619 # Set to 0 619 620 self.widget.lstParams.indexWidget(func_index).setCurrentIndex(0) 620 self.assertEqual(self.widget._model_model.rowCount(), last_row )621 self.assertEqual(self.widget._model_model.rowCount(), last_row - 2) # 2 fewer rows than default 621 622 622 623 def testPlotTheory(self): -
src/sas/qtgui/Perspectives/Fitting/FittingLogic.py
r61f0c75 r5a96a72 220 220 return plots 221 221 222 def getScalarIntermediateResults(self, return_data): 223 """ 224 Returns a dict of scalar-only intermediate results from the return data. 225 """ 226 res = {} 227 for name, int_res in return_data["intermediate_results"].items(): 228 if isinstance(int_res, np.ndarray): 229 continue 230 res[name] = int_res 231 return res 232 222 233 def computeDataRange(self): 223 234 """
Note: See TracChangeset
for help on using the changeset viewer.