- Timestamp:
- Oct 16, 2018 11:26:47 AM (6 years ago)
- 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:
- d2007a8
- Parents:
- fc9d9a3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
rfc9d9a3 r21fa45b 3475 3475 param_list.append(['model_name', str(self.cbModel.currentText())]) 3476 3476 3477 try: 3478 param_list.append(['structure_factor', str(self.cbStructureFactor.currentText())]) 3479 except: 3480 pass 3481 3477 3482 def gatherParams(row): 3478 3483 """ … … 3480 3485 """ 3481 3486 param_name = str(self._model_model.item(row, 0).text()) 3482 param_checked = str(self._model_model.item(row, 0).checkState() == QtCore.Qt.Checked)3483 param_value = str(self._model_model.item(row, 1).text())3484 param_error = None3485 param_min = None3486 param_max = None3487 column_offset = 03488 if self.has_error_column:3489 param_error = str(self._model_model.item(row, 2).text())3490 column_offset = 13491 3492 try:3493 param_min = str(self._model_model.item(row, 2+column_offset).text())3494 param_max = str(self._model_model.item(row, 3+column_offset).text())3495 except:3496 pass3497 3487 3498 3488 if param_name == str(self.cbModel.currentText()): … … 3501 3491 pass 3502 3492 else: 3493 param_checked = str(self._model_model.item(row, 0).checkState() == QtCore.Qt.Checked) 3494 param_value = str(self._model_model.item(row, 1).text()) 3495 param_error = None 3496 param_min = None 3497 param_max = None 3498 column_offset = 0 3499 if self.has_error_column: 3500 param_error = str(self._model_model.item(row, 2).text()) 3501 column_offset = 1 3502 3503 try: 3504 param_min = str(self._model_model.item(row, 2 + column_offset).text()) 3505 param_max = str(self._model_model.item(row, 3 + column_offset).text()) 3506 except: 3507 pass 3508 3503 3509 param_list.append([param_name, param_checked, param_value, param_error, param_min, param_max]) 3504 3510 … … 3550 3556 formatted_output = FittingUtilities.formatParameters(param_list) 3551 3557 elif format == "Excel": 3552 formatted_output = FittingUtilities.formatParametersExcel(param_list[ 1:])3558 formatted_output = FittingUtilities.formatParametersExcel(param_list[2:]) 3553 3559 elif format == "Latex": 3554 formatted_output = FittingUtilities.formatParametersLatex(param_list[ 1:])3560 formatted_output = FittingUtilities.formatParametersLatex(param_list[2:]) 3555 3561 else: 3556 3562 raise AttributeError("Bad format specifier.") … … 3575 3581 3576 3582 model = lines[1].split(',') 3577 print(model)3578 3583 3579 3584 if model[0] != 'model_name': 3580 3585 return False 3581 3586 3587 StrucFac = lines[2].split(',') 3588 3589 if StrucFac[0] != 'structure_factor': 3590 return False 3591 3582 3592 context['model_name'] = [model[1]] 3583 3584 for line in lines[2:-1]: 3593 context['structure_factor'] = [StrucFac[1]] 3594 3595 for line in lines[3:-1]: 3585 3596 if len(line) != 0: 3586 3597 item = line.split(',') … … 3612 3623 pass 3613 3624 3614 if str(self.cbModel.currentText()) != str(context['model_name'][0]): 3625 if str(self.cbModel.currentText()) != str(context['model_name'][0]) or \ 3626 str(self.cbStructureFactor.currentText()) != str(context['structure_factor'][0]): 3615 3627 msg = QtWidgets.QMessageBox() 3616 3628 msg.setIcon(QtWidgets.QMessageBox.Information)
Note: See TracChangeset
for help on using the changeset viewer.