Changeset 516ee4b in sasview
- Timestamp:
- Aug 2, 2018 5:55:51 AM (6 years ago)
- Branches:
- ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- 146b614
- Parents:
- cf8d6c9 (diff), b87dc1a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - git-author:
- Torin Cooper-Bennun <40573959+tcbennun@…> (08/02/18 05:55:51)
- git-committer:
- GitHub <noreply@…> (08/02/18 05:55:51)
- Location:
- src/sas/qtgui/Perspectives/Fitting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/FittingUtilities.py
r57be490 rb87dc1a 149 149 item.append([item1, item2, item4, item5, item6]) 150 150 return item 151 152 def markParameterDisabled(model, row): 153 """Given the QModel row number, format to show it is not available for fitting""" 154 155 # If an error column is present, there are a total of 6 columns. 156 items = [model.item(row, c) for c in range(6)] 157 158 model.blockSignals(True) 159 160 for item in items: 161 if item is None: 162 continue 163 item.setEditable(False) 164 item.setCheckable(False) 165 166 item = items[0] 167 168 font = QtGui.QFont() 169 font.setItalic(True) 170 item.setFont(font) 171 item.setForeground(QtGui.QBrush(QtGui.QColor(100, 100, 100))) 172 item.setToolTip("This parameter cannot be fitted.") 173 174 model.blockSignals(False) 151 175 152 176 def addCheckedListToModel(model, param_list): -
src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
rdc71408 rb87dc1a 15 15 from PyQt5 import QtWidgets 16 16 17 from sasmodels import product18 17 from sasmodels import generate 19 18 from sasmodels import modelinfo 20 19 from sasmodels.sasview_model import load_standard_models 20 from sasmodels.sasview_model import MultiplicationModel 21 21 from sasmodels.weights import MODELS as POLYDISPERSITY_MODELS 22 22 … … 1961 1961 structure_module = generate.load_kernel_module(structure_factor) 1962 1962 structure_parameters = modelinfo.make_parameter_table(getattr(structure_module, 'parameters', [])) 1963 1963 1964 structure_kernel = self.models[structure_factor]() 1964 1965 self.kernel_module._model_info = product.make_product_info(self.kernel_module._model_info, structure_kernel._model_info) 1965 form_kernel = self.kernel_module 1966 1967 self.kernel_module = MultiplicationModel(form_kernel, structure_kernel) 1966 1968 1967 1969 new_rows = FittingUtilities.addSimpleParametersToModel(structure_parameters, self.is2D) 1968 1970 for row in new_rows: 1969 1971 self._model_model.appendRow(row) 1972 # disable fitting of parameters not listed in self.kernel_module (probably radius_effective) 1973 if row[0].text() not in self.kernel_module.params.keys(): 1974 row_num = self._model_model.rowCount() - 1 1975 FittingUtilities.markParameterDisabled(self._model_model, row_num) 1976 1970 1977 # Update the counter used for multishell display 1971 1978 self._last_model_row = self._model_model.rowCount()
Note: See TracChangeset
for help on using the changeset viewer.