Changeset b685c7b in sasview
- Timestamp:
- Mar 28, 2018 1:29:47 PM (7 years ago)
- 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:
- 441a03f
- Parents:
- ba4e3ba
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Inversion/InversionPerspective.py
rba4e3ba rb685c7b 221 221 Update boxes with initial values 222 222 """ 223 item = QtGui.QStandardItem("")224 self.model.setItem(WIDGETS.W_FILENAME, item)225 223 item = QtGui.QStandardItem(str(BACKGROUND_INPUT)) 226 224 self.model.setItem(WIDGETS.W_BACKGROUND_INPUT, item) … … 282 280 self.removeButton.setEnabled(self.logic.data_is_loaded) 283 281 self.explorerButton.setEnabled(self.logic.data_is_loaded) 282 self.regConstantSuggestionButton.setEnabled( 283 self._calculator.suggested_alpha != self._calculator.alpha) 284 self.noOfTermsSuggestionButton.setEnabled( 285 self._calculator.nfunc != self.nTermsSuggested) 284 286 285 287 def populateDataComboBox(self, filename, data_ref): … … 400 402 # Estimate initial values from data 401 403 self.performEstimate() 402 self.enableButtons()403 404 self.updateGuiValues() 404 405 … … 460 461 self.model.setItem(WIDGETS.W_COMP_TIME, 461 462 QtGui.QStandardItem("{:.4g}".format(elapsed))) 462 if alpha != 0: 463 self.regConstantSuggestionButton.setText("{:-3.2g}".format(alpha)) 464 self.regConstantSuggestionButton.setEnabled(alpha != self._calculator.alpha) 465 if nterms != self.nTermsSuggested: 466 self.noOfTermsSuggestionButton.setText( 467 "{:n}".format(self.nTermsSuggested)) 468 self.noOfTermsSuggestionButton.setEnabled(nterms != self.nTermsSuggested) 463 self.regConstantSuggestionButton.setText("{:-3.2g}".format(alpha)) 464 self.noOfTermsSuggestionButton.setText( 465 "{:n}".format(self.nTermsSuggested)) 469 466 self.model.setItem(WIDGETS.W_COMP_TIME, 470 467 QtGui.QStandardItem("{:.2g}".format(elapsed))) … … 488 485 "{:.3g}".format( 489 486 pr.get_pos_err(out, cov)))) 487 self.enableButtons() 490 488 491 489 def removeData(self): 492 490 """Remove the existing data reference from the P(r) Persepective""" 493 491 if self.dmaxWindow is not None: 492 self.dmaxWindow.done() 494 493 self.dmaxWindow = None 495 494 self.dataList.removeItem(self.dataList.currentIndex()) … … 498 497 if len(self._data_list) == 0: 499 498 self._data = None 499 self._data_set = None 500 500 self.pr_plot = None 501 self. _data_set = None501 self.data_plot = None 502 502 self._calculator = Invertor() 503 self.logic.data = None 503 self.logic.data = self._data_set 504 self.nTermsSuggested = NUMBER_OF_TERMS 505 self.noOfTermsSuggestionButton.setText("{:n}".format( 506 self.nTermsSuggested)) 507 self.regConstantSuggestionButton.setText("{:-3.2g}".format( 508 REGULARIZATION)) 504 509 self.enableButtons() 510 self.setupModel() 505 511 else: 506 512 self.dataList.setCurrentIndex(0)
Note: See TracChangeset
for help on using the changeset viewer.