- Timestamp:
- Apr 19, 2017 9:07:46 AM (8 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:
- e1e3e09
- Parents:
- cd2cc745
- Location:
- src/sas/qtgui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/MainWindow/GuiManager.py
r83eb5208 r9d266d2 52 52 self._workspace = parent 53 53 self._parent = parent 54 55 # Reactor - singleton56 self.setReactor(reactor)57 54 58 55 # Add signal callbacks … … 162 159 self.progress.setVisible(False) 163 160 164 def file Read(self, data):161 def fileWasRead(self, data): 165 162 """ 166 163 Callback for fileDataReceivedSignal … … 208 205 """ Accessor for the communicator """ 209 206 return self.communicate 210 211 def reactor(self):212 """ Accessor for the reactor """213 return self._reactor214 215 def setReactor(self, reactor):216 """ Reactor setter """217 self._reactor = reactor218 207 219 208 def perspective(self): … … 338 327 """ 339 328 self.communicate = GuiUtils.Communicate() 340 self.communicate.fileDataReceivedSignal.connect(self.file Read)329 self.communicate.fileDataReceivedSignal.connect(self.fileWasRead) 341 330 self.communicate.statusBarUpdateSignal.connect(self.updateStatusBar) 342 331 self.communicate.updatePerspectiveWithDataSignal.connect(self.updatePerspective) -
src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
r83eb5208 r9d266d2 25 25 from sas.sasgui.perspectives.fitting.model_thread import Calc1D 26 26 from sas.sasgui.perspectives.fitting.model_thread import Calc2D 27 from sas.sasgui.perspectives.fitting.utils import get_weight 27 28 28 29 from UI.FittingWidgetUI import Ui_FittingWidgetUI … … 67 68 # Parameters to fit 68 69 self.parameters_to_fit = None 70 # Weight radio box group 71 self.weightingGroup = QtGui.QButtonGroup() 69 72 70 73 # Which tab is this widget displayed in? … … 231 234 self.tabFitting.setTabEnabled(TAB_MAGNETISM, False) 232 235 self.lblChi2Value.setText("---") 233 # group boxes236 # Group boxes 234 237 self.boxWeighting.setEnabled(False) 235 238 self.cmdMaskEdit.setEnabled(False) 239 # Button groups 240 self.weightingGroup.addButton(self.rbWeighting1) 241 self.weightingGroup.addButton(self.rbWeighting2) 242 self.weightingGroup.addButton(self.rbWeighting3) 243 self.weightingGroup.addButton(self.rbWeighting4) 236 244 237 245 def initializeSignals(self): … … 260 268 self.txtSmearUp.editingFinished.connect(self.onSmearUp) 261 269 self.txtSmearDown.editingFinished.connect(self.onSmearDown) 270 # Button groups 271 self.weightingGroup.buttonClicked.connect(self.onWeightingChoice) 262 272 263 273 # Respond to change in parameters from the UI … … 353 363 """ 354 364 pass 365 366 def onWeightingChoice(self, button): 367 """ 368 Update weighting in the fit state 369 """ 370 button_id = button.group().checkedId() 371 button_id = abs(button_id + 2) 372 #self.fitPage.weighting = button_id 373 print button_id 355 374 356 375 def onPolyModelChange(self, item): … … 401 420 params_to_fit = self.parameters_to_fit 402 421 422 # Potential weights added 423 self.addWeightingToData(data) 424 403 425 # These should be updating somehow? 404 426 fit_id = 0 … … 688 710 checked_list = ['scale', '1.0', '0.0', 'inf', ''] 689 711 FittingUtilities.addCheckedListToModel(model, checked_list) 712 713 def addWeightingToData(self, data): 714 """ 715 Adds weighting contribution to fitting data 716 """ 717 # Check the state of the Weighting radio buttons 718 button_id = self.weightingGroup.checkedId() 719 button_id = abs(button_id + 2) 720 if button_id == 0: 721 return 722 # Send original data for weighting 723 weight = get_weight(data=data, is2d=self.is2D, flag=button_id) 724 if self.is2D: 725 data.err_data = weight 726 else: 727 data.dy = weight 690 728 691 729 def updateQRange(self): -
src/sas/qtgui/Perspectives/Fitting/UI/FittingWidgetUI.ui
r6c8fb2c r9d266d2 511 511 <layout class="QVBoxLayout" name="verticalLayout"> 512 512 <item> 513 <widget class="QRadioButton" name="r adioButton">513 <widget class="QRadioButton" name="rbWeighting1"> 514 514 <property name="text"> 515 515 <string>None</string> … … 521 521 </item> 522 522 <item> 523 <widget class="QRadioButton" name="r adioButton_2">523 <widget class="QRadioButton" name="rbWeighting2"> 524 524 <property name="text"> 525 525 <string>Use dI Data</string> … … 528 528 </item> 529 529 <item> 530 <widget class="QRadioButton" name="r adioButton_3">530 <widget class="QRadioButton" name="rbWeighting3"> 531 531 <property name="text"> 532 532 <string>Use |sqrt(I Data)|</string> … … 535 535 </item> 536 536 <item> 537 <widget class="QRadioButton" name="r adioButton_4">537 <widget class="QRadioButton" name="rbWeighting4"> 538 538 <property name="text"> 539 539 <string>Use |I Data|</string>
Note: See TracChangeset
for help on using the changeset viewer.