Changeset 69363c7 in sasview for src/sas/sasgui/perspectives/fitting/model_thread.py
- Timestamp:
- Sep 22, 2017 8:29:48 AM (7 years ago)
- Branches:
- master, 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, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- ab0b93f
- Parents:
- 1386b2f (diff), d76c43a (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:
- Paul Kienzle <pkienzle@…> (09/22/17 08:28:48)
- git-committer:
- Paul Kienzle <pkienzle@…> (09/22/17 08:29:48)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/model_thread.py
r65f3930 r69363c7 90 90 self.data.qy_data[index_model] 91 91 ]) 92 output = np.zeros(len(self.data.qx_data)) 92 # Initialize output to NaN so masked elements do not get plotted. 93 output = np.empty_like(self.data.qx_data) 93 94 # output default is None 94 95 # This method is to distinguish between masked 95 96 #point(nan) and data point = 0. 96 output = output / output97 output[:] = np.NaN 97 98 # set value for self.mask==True, else still None to Plottools 98 99 output[index_model] = value … … 197 198 output[index] = self.model.evalDistribution(self.data.x[index]) 198 199 200 x=self.data.x[index] 201 y=output[index] 199 202 sq_values = None 200 203 pq_values = None 201 s_model = None202 p_model = None203 204 if isinstance(self.model, MultiplicationModel): 204 205 s_model = self.model.s_model 205 206 p_model = self.model.p_model 206 elif hasattr(self.model, "get_composition_models"): 207 p_model, s_model = self.model.get_composition_models() 208 209 if p_model is not None and s_model is not None: 210 sq_values = np.zeros((len(self.data.x))) 211 pq_values = np.zeros((len(self.data.x))) 212 sq_values[index] = s_model.evalDistribution(self.data.x[index]) 213 pq_values[index] = p_model.evalDistribution(self.data.x[index]) 207 sq_values = s_model.evalDistribution(x) 208 pq_values = p_model.evalDistribution(x) 209 elif hasattr(self.model, "calc_composition_models"): 210 results = self.model.calc_composition_models(x) 211 if results is not None: 212 pq_values, sq_values = results 213 214 214 215 215 elapsed = time.time() - self.starttime 216 216 217 self.complete(x= self.data.x[index], y=output[index],217 self.complete(x=x, y=y, 218 218 page_id=self.page_id, 219 219 state=self.state,
Note: See TracChangeset
for help on using the changeset viewer.