Changeset d132f33 in sasview
- Timestamp:
- Oct 28, 2017 8:44:29 AM (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:
- fca1f50, 26f42b1
- Parents:
- 57ad773
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Inversion/InversionPerspective.py
r57ad773 rd132f33 64 64 self._data_index = 0 65 65 # list mapping data to p(r) calculation 66 self._data_list = []66 self._data_list = {} 67 67 if not isinstance(data, list): 68 data = [data] 69 for datum in data: 70 self._data_list.append({datum: self._calculator.clone()}) 68 data_list = [data] 69 if data is not None: 70 for datum in data_list: 71 self._data_list[datum] = self._calculator.clone() 71 72 72 73 # plots … … 90 91 91 92 def allowBatch(self): 92 return False93 return True 93 94 94 95 def setClosable(self, value=True): … … 118 119 """Connect the use controls to their appropriate methods""" 119 120 self.enableButtons() 120 # TODO: enable the drop down box once batch is working 121 self.dataList.setEnabled(False) 122 # TODO: enable displayChange once batch is working 123 # self.dataList.currentIndexChanged.connect(self.displayChange) 121 self.dataList.currentIndexChanged.connect(self.displayChange) 124 122 self.calculateButton.clicked.connect(self._calculation) 125 123 self.helpButton.clicked.connect(self.help) … … 272 270 self.regConstantSuggestionButton.text())) 273 271 272 def displayChange(self): 273 data_name = str(self.dataList.currentText()) 274 # TODO: Find data ref based on file name 275 # TODO: Find way to link standardmodelitem with combobox entry 276 274 277 ###################################################################### 275 278 # GUI Interaction Events … … 285 288 Calculate the P(r) for every data set in the data list 286 289 """ 287 # Set data before running the calculations 288 self.update_calculator() 289 # Run 290 self.startThread() 290 for data_ref, pr in self._data_list.items(): 291 self._data_set = GuiUtils.dataFromItem(data_ref) 292 self._calculator = pr 293 # Set data before running the calculations 294 self.update_calculator() 295 # Run 296 self.startThread() 291 297 292 298 def model_changed(self): … … 355 361 356 362 for data in data_item: 363 # Data references 357 364 self._data = data 358 365 self._data_set = GuiUtils.dataFromItem(data) 359 366 self.populateDataComboBox(self._data_set.filename) 367 self._data_list[self._data] = self._calculator 360 368 361 369 # Estimate initial values from data … … 363 371 self.logic = InversionLogic(self._data_set) 364 372 373 # Estimate q range 365 374 qmin, qmax = self.logic.computeDataRange() 366 367 375 self.model.setItem(WIDGETS.W_QMIN, QtGui.QStandardItem( 368 376 "{:.4g}".format(qmin))) … … 371 379 372 380 self.enableButtons() 373 374 # TODO: Only load 1st data until batch mode working. Thus, break375 break376 381 377 382 ###################################################################### … … 527 532 self._calculator = pr 528 533 # Append data to data list 529 self._data_list .append({self._data: pr})534 self._data_list[self._data] = self._calculator.clone() 530 535 531 536 if self.pr_plot is None:
Note: See TracChangeset
for help on using the changeset viewer.