Changeset 30bed93 in sasview for src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
- Timestamp:
- Sep 21, 2018 5:41:31 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:
- c928e81
- Parents:
- 33d5956 (diff), d8d81ea (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:
- Ingo Breßler <dev@…> (09/21/18 05:41:31)
- git-committer:
- GitHub <noreply@…> (09/21/18 05:41:31)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
r33d5956 r30bed93 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 """ 66 Returns the polydispersity distribution for parameter *name* as *value* and *weight* arrays. 67 """ 68 # type: (str) -> Tuple(np.ndarray, np.ndarray) 69 _, x, w = self._get_weights(self._model_info.parameters[name]) 70 return x, w 71 72 SasviewModel.get_weights = get_weights 60 73 61 74 logger = logging.getLogger(__name__) … … 2488 2501 2489 2502 if self.data_is_loaded: 2490 # delete any plots associated with the data that were not updated (e.g. to remove beta(Q), S_eff(Q)) 2503 # delete any plots associated with the data that were not updated 2504 # (e.g. to remove beta(Q), S_eff(Q)) 2491 2505 GuiUtils.deleteRedundantPlots(self.all_data[self.data_index], new_plots) 2492 2506 pass 2493 2507 else: 2494 # delete theory items for the model, in order to get rid of any redundant items, e.g. beta(Q), S_eff(Q) 2508 # delete theory items for the model, in order to get rid of any 2509 # redundant items, e.g. beta(Q), S_eff(Q) 2495 2510 self.communicate.deleteIntermediateTheoryPlotsSignal.emit(self.kernel_module.id) 2511 2512 # Create plots for parameters with enabled polydispersity 2513 for plot in FittingUtilities.plotPolydispersities(return_data.get('model', None)): 2514 data_id = fitted_data.id.split() 2515 plot.id = "{} [{}] {}".format(data_id[0], plot.name, " ".join(data_id[1:])) 2516 data_name = fitted_data.name.split() 2517 plot.name = " ".join([data_name[0], plot.name] + data_name[1:]) 2518 self.createNewIndex(plot) 2519 new_plots.append(plot) 2496 2520 2497 2521 # Create plots for intermediate product data
Note: See TracChangeset
for help on using the changeset viewer.