Changeset 47d7d2d in sasview for src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
- Timestamp:
- Jan 17, 2018 4:53:35 AM (7 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:
- 2d466e4
- Parents:
- be8f4b0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
rbe8f4b0 r47d7d2d 566 566 # widget.params[0] is the parameter we're constraining 567 567 constraint.param = mc_widget.params[0] 568 # Function should have the model name preamble 569 #model_name = self.kernel_module.name 570 #constraint.func = model_name + ":" + c_text 568 571 constraint.func = c_text 569 572 … … 741 744 e.g. [('sld','5*sld_solvent')] 742 745 """ 743 model_name = self.modelName() 744 self.kernel_module.name = model_name 746 model_name = self.kernel_module.name 745 747 param_number = self._model_model.rowCount() 746 748 def preamble(s): … … 812 814 model = None 813 815 self.respondToModelStructure(model=model, structure_factor=structure) 816 817 def replaceConstraintName(self, old_name, new_name=""): 818 """ 819 Replace names of models in defined constraints 820 """ 821 param_number = self._model_model.rowCount() 822 # loop over parameters 823 for row in range(param_number): 824 if self.rowHasConstraint(row): 825 func = self._model_model.item(row, 1).child(0).data().func 826 if old_name in func: 827 new_func = func.replace(old_name, new_name) 828 self._model_model.item(row, 1).child(0).data().func = new_func 829 830 pass 814 831 815 832 def respondToModelStructure(self, model=None, structure_factor=None):
Note: See TracChangeset
for help on using the changeset viewer.