Changeset 804fefa in sasview for src/sas/sasgui/perspectives/fitting/fitting.py
- Timestamp:
- Oct 5, 2016 11:03:32 AM (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:
- 6a0c75d1
- Parents:
- c807957
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/fitting.py
rc807957 r804fefa 1666 1666 1667 1667 def create_theory_1D(self, x, y, page_id, model, data, state, 1668 data_description, data_id ):1668 data_description, data_id, dy=None): 1669 1669 """ 1670 1670 Create a theory object associate with an existing Data1D … … 1680 1680 """ 1681 1681 new_plot = Data1D(x=x, y=y) 1682 new_plot.is_data = False 1683 new_plot.dy = numpy.zeros(len(y)) 1684 new_plot.symbol = GUIFRAME_ID.CURVE_SYMBOL_NUM 1682 new_plot.is_data = dy is not None 1683 new_plot.interactive = True 1684 new_plot.dy = dy 1685 new_plot.dx = None 1686 new_plot.dxl = None 1687 new_plot.dxw = None 1688 # If this is a theory curve, pick the proper symbol to make it a curve 1689 if not new_plot.is_data: 1690 new_plot.symbol = GUIFRAME_ID.CURVE_SYMBOL_NUM 1685 1691 _yaxis, _yunit = data.get_yaxis() 1686 1692 _xaxis, _xunit = data.get_xaxis() 1687 1693 new_plot.title = data.name 1688 1689 1694 new_plot.group_id = data.group_id 1690 1695 if new_plot.group_id == None: … … 1713 1718 toggle_mode_on=False, state=None, 1714 1719 data=None, update_chisqr=True, 1715 source='model', plot_result=True, unsmeared_model=None): 1720 source='model', plot_result=True, 1721 unsmeared_model=None, unsmeared_data=None, 1722 unsmeared_error=None): 1716 1723 """ 1717 1724 Complete plotting 1D data 1718 1725 @param unsmeared_model: fit model, without smearing 1726 @param unsmeared_data: data, rescaled to unsmeared model 1719 1727 """ 1720 1728 try: … … 1724 1732 data_id=str(page_id) + " " + data.name) 1725 1733 if unsmeared_model is not None: 1734 logging.error(str(unsmeared_error)) 1726 1735 self.create_theory_1D(x, unsmeared_model, page_id, model, data, state, 1727 1736 data_description=model.name + " unsmeared", 1728 1737 data_id=str(page_id) + " " + data.name + " unsmeared") 1738 1739 self.create_theory_1D(x, unsmeared_data, page_id, model, data, state, 1740 data_description="Data unsmeared", 1741 data_id="Data " + data.name + " unsmeared", 1742 dy=unsmeared_error) 1729 1743 1730 1744 current_pg = self.fit_panel.get_page_by_id(page_id)
Note: See TracChangeset
for help on using the changeset viewer.