Changeset fa3da01 in sasview


Ignore:
Timestamp:
Sep 9, 2018 5:01:08 AM (6 years ago)
Author:
Torin Cooper-Bennun <torin.cooper-bennun@…>
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.
Message:

Merge branch 'ESS_GUI' into ESS_GUI_iss1052

Location:
src/sas/qtgui
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/MainWindow/DataExplorer.py

    r5d28d6b r2b8286c  
    593593            self.plotData(new_plots) 
    594594 
    595     def displayData(self, data_list, id): 
     595    def displayData(self, data_list, id=None): 
    596596        """ 
    597597        Forces display of charts for the given data set 
  • src/sas/qtgui/Perspectives/Fitting/FittingWidget.py

    re4041a2 rfa3da01  
    569569            menu.exec_(self.lstParams.viewport().mapToGlobal(position)) 
    570570        except AttributeError as ex: 
    571             logging.error("Error generating context menu: %s" % ex) 
     571            logger.error("Error generating context menu: %s" % ex) 
    572572        return 
    573573 
     
    14561456            self.communicate.statusBarUpdateSignal.emit(msg) 
    14571457            msg += results.mesg 
    1458             logging.error(msg) 
     1458            logger.error(msg) 
    14591459            return 
    14601460 
     
    14991499        if self.calc_fit._interrupting: 
    15001500            msg = "Fitting cancelled by user after: %s s." % GuiUtils.formatNumber(elapsed) 
    1501             logging.warning("\n"+msg+"\n") 
     1501            logger.warning("\n"+msg+"\n") 
    15021502        else: 
    15031503            msg = "Fitting completed successfully in: %s s." % GuiUtils.formatNumber(elapsed) 
     
    20522052                kernel_module = generate.load_kernel_module(name) 
    20532053            except ModuleNotFoundError as ex: 
    2054                 logging.error("Can't find the model "+ str(ex)) 
     2054                logger.error("Can't find the model "+ str(ex)) 
    20552055                return 
    20562056 
     
    26102610        """ 
    26112611        # TODO: remimplement thread cancellation 
    2612         logging.error("".join(traceback.format_exception(etype, value, tb))) 
     2612        logger.error("".join(traceback.format_exception(etype, value, tb))) 
    26132613 
    26142614    def setTableProperties(self, table): 
     
    27922792 
    27932793        if not datafile: 
    2794             logging.info("No weight data chosen.") 
     2794            logger.info("No weight data chosen.") 
    27952795            raise IOError 
    27962796 
     
    29082908        self._n_shells_row = shell_row - 1 
    29092909 
    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) 
    29132923 
    29142924    def modifyShellsInList(self, index): 
  • src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingWidgetTest.py

    r4ea8020 rf712bf30  
    613613 
    614614        # Check that the number of rows increased 
     615        # (note that n == 1 by default in core_multi_shell so this increases index by 2) 
    615616        more_rows = self.widget._model_model.rowCount() - last_row 
    616         self.assertEqual(more_rows, 6) # 6 new rows: 2 params per index 
    617  
    618         # Back to 0 
     617        self.assertEqual(more_rows, 4) # 4 new rows: 2 params per index 
     618 
     619        # Set to 0 
    619620        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 
    621622 
    622623    def testPlotTheory(self): 
  • src/sas/qtgui/Perspectives/Inversion/InversionPerspective.py

    r3c6ecd9 r2b8286c  
    545545            title = self.prPlot.name 
    546546            GuiUtils.updateModelItemWithPlot(self._data, self.prPlot, title) 
    547             self.communicate.plotRequestedSignal.emit([self.prPlot]) 
     547            self.communicate.plotRequestedSignal.emit([self.prPlot], None) 
    548548        if self.dataPlot is not None: 
    549549            title = self.dataPlot.name 
    550550            GuiUtils.updateModelItemWithPlot(self._data, self.dataPlot, title) 
    551             self.communicate.plotRequestedSignal.emit([self.dataPlot]) 
     551            self.communicate.plotRequestedSignal.emit([self.dataPlot], None) 
    552552        self.enableButtons() 
    553553 
  • src/sas/qtgui/Perspectives/Fitting/FittingLogic.py

    r61f0c75 r5a96a72  
    220220        return plots 
    221221 
     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 
    222233    def computeDataRange(self): 
    223234        """ 
Note: See TracChangeset for help on using the changeset viewer.