Ignore:
Timestamp:
Nov 17, 2017 8:59:52 AM (7 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
0261bc1
Parents:
84df556
Message:

Implemented hash method for certain QStandardItem objects, allowing them to be used as dict keys. SASVIEW-806
Minor inversion perspective fixes. SASVIEW-338

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Perspectives/Inversion/DMaxExplorerWidget.py

    • Property mode changed from 100755 to 100644
    rd4881f6a r6a3e1fe  
    2424 
    2525# local 
    26 from .UI.dmax import Ui_DmaxExplorer 
    27 # from InvariantDetails import DetailsDialog 
    28 # from InvariantUtils import WIDGETS 
     26from .UI.DMaxExplorer import Ui_DmaxExplorer 
    2927 
    3028logger = logging.getLogger(__name__) 
     
    7876    def setupModel(self): 
    7977        self.model.setItem(W.NPTS, QtGui.QStandardItem(str(self.nfunc))) 
    80         self.model.setItem(W.DMIN, 
    81                            QtGui.QStandardItem( 
    82                                str(0.9*self.pr_state.d_max))) 
    83         self.model.setItem(W.DMAX, 
    84                            QtGui.QStandardItem( 
    85                                str(1.1*self.pr_state.d_max))) 
    86         self.model.setItem(W.VARIABLE, 
    87                            QtGui.QStandardItem( "χ²/dof")) 
     78        self.model.setItem(W.DMIN, QtGui.QStandardItem(str(0.9*self.pr_state.d_max))) 
     79        self.model.setItem(W.DMAX, QtGui.QStandardItem(str(1.1*self.pr_state.d_max))) 
     80        self.model.setItem(W.VARIABLE, QtGui.QStandardItem( "χ²/dof")) 
    8881 
    8982    def setupMapper(self): 
     
    133126                msg += "for D_max=%s\n%s" % (str(x), sys.exc_info()[1]) 
    134127                print(msg) 
    135                 # logger.error(msg) 
     128                logger.error(msg) 
    136129 
    137130        #Return the invertor to its original state 
    138131        self.pr_state.d_max = original 
    139         self.pr_state.invert(self.nfunc) 
     132        try: 
     133            self.pr_state.invert(self.nfunc) 
     134        except RuntimeError as ex: 
     135            msg = "ExploreDialog: inversion failed " 
     136            msg += "for D_max=%s\n%s" % (str(x), sys.exc_info()[1]) 
     137            print(msg) 
     138            logger.error(msg) 
    140139 
    141140        plotter = str(self.model.item(W.VARIABLE).text()) 
Note: See TracChangeset for help on using the changeset viewer.