Changeset aa82f54 in sasview for src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
- Timestamp:
- Sep 18, 2018 4:33:43 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:
- 16287f3
- Parents:
- db500cb
- git-author:
- Ingo Breßler <dev@…> (09/18/18 04:33:38)
- git-committer:
- Ingo Breßler <dev@…> (09/18/18 04:33:43)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
r3ae70f9 raa82f54 58 58 DEFAULT_POLYDISP_FUNCTION = 'gaussian' 59 59 60 # CRUFT: remove when new release of sasmodels is available 61 # https://github.com/SasView/sasview/pull/181#discussion_r218135162 62 from sasmodels.sasview_model import SasviewModel 63 if not hasattr(SasviewModel, 'get_weights'): 64 def get_weights(self, name): 65 """Returns model weights by parameter name. 66 type: (str) -> Tuple(float, np.ndarray, np.ndarray) 67 Supposed to be a member of SasviewModel.""" 68 p = [p for p in self._model_info.parameters.call_parameters 69 if name is p.name] 70 if not len(p): 71 return None, None, None 72 return self._get_weights(p[0]) 73 74 SasviewModel.get_weights = get_weights 60 75 61 76 logger = logging.getLogger(__name__)
Note: See TracChangeset
for help on using the changeset viewer.