Changeset 358b39d in sasview for src/sas/qtgui/Perspectives/Fitting
- Timestamp:
- May 30, 2017 10:14:11 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:
- aca8418
- Parents:
- c1e380e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
rc1e380e r358b39d 16 16 from sasmodels import modelinfo 17 17 from sasmodels.sasview_model import load_standard_models 18 from sasmodels.weights import MODELS as POLYDISPERSITY_MODELS 19 18 20 from sas.sascalc.fit.BumpsFitting import BumpsFit as Fit 19 21 … … 40 42 CATEGORY_STRUCTURE = "Structure Factor" 41 43 STRUCTURE_DEFAULT = "None" 44 45 DEFAULT_POLYDISP_FUNCTION = 'gaussian' 42 46 43 47 # Mapping between column index and relevant parameter name extension … … 479 483 parameter_name = str(name_index.data().toString()).lower() # "distribution of sld" etc. 480 484 if "distribution of" in parameter_name: 481 parameter_name = parameter_name[16:] 485 # just the last word 486 parameter_name = parameter_name.rsplit()[-1] 482 487 483 488 # Extract changed value. Assumes proper validation by QValidator/Delegate … … 998 1003 poly_params = self.checkedListFromModel(self._poly_model) 999 1004 # Retrieve poly params names 1000 poly_params = [param [16:]+'.width' for param in poly_params]1005 poly_params = [param.rsplit()[-1] + '.width' for param in poly_params] 1001 1006 # TODO : add magnetic params 1002 1007 … … 1207 1212 FittingUtilities.addCheckedListToModel(self._poly_model, checked_list) 1208 1213 1209 # TODO: Need to find cleaner way to input functions1214 # All possible polydisp. functions as strings in combobox 1210 1215 func = QtGui.QComboBox() 1211 func.addItems(['rectangle', 'array', 'lognormal', 'gaussian', 'schulz',]) 1216 func.addItems([str(name_disp) for name_disp in POLYDISPERSITY_MODELS.iterkeys()]) 1217 # Default index 1218 func.setCurrentIndex(func.findText(DEFAULT_POLYDISP_FUNCTION)) 1219 # Index in the view 1212 1220 func_index = self.lstPoly.model().index(row, 6) 1221 # Set the combobox in cell 1213 1222 self.lstPoly.setIndexWidget(func_index, func) 1214 1223
Note: See TracChangeset
for help on using the changeset viewer.