Changeset ca4d985 in sasview
- Timestamp:
- Oct 5, 2016 2:52:56 PM (8 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, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- cbbb6a4, 3fac0df
- Parents:
- edbe974
- Location:
- src/sas/sasgui/perspectives/fitting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/fitting.py
redbe974 rca4d985 1723 1723 source='model', plot_result=True, 1724 1724 unsmeared_model=None, unsmeared_data=None, 1725 unsmeared_error=None ):1725 unsmeared_error=None, sq_model=None, pq_model=None): 1726 1726 """ 1727 1727 Complete plotting 1D data … … 1744 1744 data_id="Data " + data.name + " unsmeared", 1745 1745 dy=unsmeared_error) 1746 1747 if sq_model is not None and pq_model is not None: 1748 self.create_theory_1D(x, sq_model, page_id, model, data, state, 1749 data_description=model.name + " S(q)", 1750 data_id=str(page_id) + " " + data.name + " S(q)") 1751 self.create_theory_1D(x, pq_model, page_id, model, data, state, 1752 data_description=model.name + " P(q)", 1753 data_id=str(page_id) + " " + data.name + " P(q)") 1754 1746 1755 1747 1756 current_pg = self.fit_panel.get_page_by_id(page_id) -
src/sas/sasgui/perspectives/fitting/model_thread.py
r804fefa rca4d985 7 7 import math 8 8 from sas.sascalc.data_util.calcthread import CalcThread 9 from sas.sascalc.fit.MultiplicationModel import MultiplicationModel 9 10 10 11 class Calc2D(CalcThread): … … 194 195 output[index] = self.model.evalDistribution(self.data.x[index]) 195 196 197 sq_model = None 198 pq_model = None 199 if isinstance(self.model, MultiplicationModel): 200 sq_model = numpy.zeros((len(self.data.x))) 201 pq_model = numpy.zeros((len(self.data.x))) 202 sq_model[index] = self.model.s_model.evalDistribution(self.data.x[index]) 203 pq_model[index] = self.model.p_model.evalDistribution(self.data.x[index]) 204 196 205 elapsed = time.time() - self.starttime 197 206 … … 208 217 unsmeared_model=unsmeared_output, 209 218 unsmeared_data=unsmeared_data, 210 unsmeared_error=unsmeared_error) 219 unsmeared_error=unsmeared_error, 220 pq_model=pq_model, 221 sq_model=sq_model) 211 222 212 223 def results(self):
Note: See TracChangeset
for help on using the changeset viewer.