Changeset 3ae9179 in sasview for src/sas/qtgui/Perspectives/Fitting/ModelThread.py
- Timestamp:
- Aug 10, 2018 6:17:13 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:
- 44777ee
- Parents:
- a2cc8b97
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/ModelThread.py
rd4dac80 r3ae9179 222 222 s_model = self.model.s_model 223 223 p_model = self.model.p_model 224 elif hasattr(self.model, "get_composition_models"): 225 p_model, s_model = self.model.get_composition_models() 226 227 if p_model is not None and s_model is not None: 228 sq_values = numpy.zeros((len(self.data.x))) 229 pq_values = numpy.zeros((len(self.data.x))) 230 sq_values[index] = s_model.evalDistribution(self.data.x[index]) 231 pq_values[index] = p_model.evalDistribution(self.data.x[index]) 224 elif hasattr(self.model, "calc_composition_models"): 225 results = self.model.calc_composition_models(self.data.x[index]) 226 if results is not None: 227 pq_values, sq_values = results 228 229 if pq_values is None or sq_values is None: 230 if p_model is not None and s_model is not None: 231 sq_values = numpy.zeros((len(self.data.x))) 232 pq_values = numpy.zeros((len(self.data.x))) 233 sq_values[index] = s_model.evalDistribution(self.data.x[index]) 234 pq_values[index] = p_model.evalDistribution(self.data.x[index]) 232 235 233 236 elapsed = time.time() - self.starttime … … 243 246 self.data, 244 247 self.update_chisqr, 245 self.source) 248 self.source, 249 unsmeared_output, unsmeared_data, unsmeared_error, 250 pq_values, sq_values) 246 251 else: 247 252 self.complete(x=self.data.x[index], y=output[index],
Note: See TracChangeset
for help on using the changeset viewer.