Changeset c7809a9 in sasview
- Timestamp:
- Sep 4, 2018 5:51:26 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:
- f3a19ad
- Parents:
- 700b03b
- git-author:
- Torin Cooper-Bennun <torin.cooper-bennun@…> (08/30/18 11:25:34)
- git-committer:
- Torin Cooper-Bennun <torin.cooper-bennun@…> (09/04/18 05:51:26)
- Location:
- src/sas/qtgui/Perspectives/Fitting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/FittingUtilities.py
r700b03b rc7809a9 160 160 item4 = QtGui.QStandardItem(str(param.limits[0])) 161 161 item5 = QtGui.QStandardItem(str(param.limits[1])) 162 item6 = QtGui.QStandardItem( param.units)162 item6 = QtGui.QStandardItem(str(param.units)) 163 163 item6.setEditable(False) 164 164 item.append([item1, item2, item4, item5, item6]) -
src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
r700b03b rc7809a9 2068 2068 2069 2069 self.kernel_module = MultiplicationModel(p_kernel, s_kernel) 2070 all_params = self.kernel_module._model_info.parameters.kernel_parameters 2071 all_param_names = [param.name for param in all_params] 2070 2072 2071 2073 # S(Q) params from the product model are not necessarily the same as those from the S(Q) model; any conflicting 2072 2074 # names with P(Q) params will cause a rename; we also lose radius_effective (for now...) 2073 s_params = modelinfo.ParameterTable( 2074 self.kernel_module._model_info.parameters.kernel_parameters[p_pars_len:p_pars_len+s_pars_len]) 2075 2076 # These are the parameters before rename; ignore the first one, as it is radius_effective, which is removed 2077 # from the product model to be handled internally (for now...) 2078 s_params_orig = modelinfo.ParameterTable(s_kernel._model_info.parameters.kernel_parameters[1:]) 2075 2076 if "radius_effective_mode" in all_param_names: 2077 # for this version of sasmodels we do NOT kill radius_effective 2078 s_params = modelinfo.ParameterTable(all_params[p_pars_len:p_pars_len+s_pars_len]) 2079 s_params_orig = modelinfo.ParameterTable(s_kernel._model_info.parameters.kernel_parameters) 2080 else: 2081 # kill radius_effective 2082 s_pars_len -= 1 2083 s_params = modelinfo.ParameterTable(all_params[p_pars_len+1:p_pars_len+s_pars_len]) 2084 s_params_orig = modelinfo.ParameterTable(s_kernel._model_info.parameters.kernel_parameters[1:]) 2079 2085 2080 2086 # Get new rows for QModel … … 2082 2088 new_rows = FittingUtilities.addSimpleParametersToModel(s_params, self.is2D, s_params_orig) 2083 2089 2084 # TODO: deal with new parameter(s) added to product model, in kernel_parameters[p_pars_len+s_pars_len:] 2090 # TODO: merge the rest of this implementation in 2091 # These parameters are not part of P(Q) nor S(Q), but are added only to the product model (e.g. specifying 2092 # structure factor calculation mode) 2093 # product_params = all_params[p_pars_len+s_pars_len:] 2085 2094 2086 2095 # Add heading row … … 2344 2353 GuiUtils.deleteRedundantPlots(self.all_data[self.data_index], new_plots) 2345 2354 2355 # TODO: merge rest of beta approx implementation in 2356 # TODO: refactor 2357 # deal with constrained radius_effective 2358 # for row in range(self._model_model.rowCount()): 2359 # if self._model_model.item(row, 0).text() == "radius_effective_mode": 2360 # if GuiUtils.toDouble(self._model_model.item(row, 1).text()) == 0: 2361 # return 2362 # radius_effective = intermediate_ER() 2363 # if radius_effective: 2364 # for row in range(self._model_model.rowCount()): 2365 # if self._model_model.item(row, 0).text() == "radius_effective": 2366 # self._model_model.item(row, 1).setText(str(radius_effective)) 2367 # break 2368 2346 2369 for plot in new_plots: 2347 2370 if hasattr(plot, "id") and "esidual" in plot.id:
Note: See TracChangeset
for help on using the changeset viewer.