Changeset e3f6ef5 in sasview for fittingview/src/sans/perspectives
- Timestamp:
- Oct 10, 2011 5:53:52 PM (13 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, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 4c712ea4
- Parents:
- 05fb6d12
- Location:
- fittingview/src/sans/perspectives/fitting
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
fittingview/src/sans/perspectives/fitting/basepage.py
rb6685b2 re3f6ef5 1779 1779 break 1780 1780 1781 def _draw_model(self, update_chisqr=True ):1781 def _draw_model(self, update_chisqr=True, source='model'): 1782 1782 """ 1783 1783 Method to draw or refresh a plotted model. … … 1810 1810 enable2D=is_2d, 1811 1811 update_chisqr=update_chisqr, 1812 source='model', 1812 1813 weight=weight) 1813 1814 -
fittingview/src/sans/perspectives/fitting/fitpage.py
rc7e8898 re3f6ef5 2162 2162 self._mac_sleep(0.1) 2163 2163 #plot model ( when drawing, do not update chisqr value again) 2164 self._draw_model(update_chisqr=False )2164 self._draw_model(update_chisqr=False, source = 'fit') 2165 2165 #PostStatusEvent 2166 2166 #msg = "Fit completed!dddd " -
fittingview/src/sans/perspectives/fitting/fitting.py
r05fb6d12 re3f6ef5 645 645 toggle_mode_on=False, 646 646 qmin=None, qmax=None, 647 update_chisqr=True, weight=None ):647 update_chisqr=True, weight=None, source='model'): 648 648 """ 649 649 Draw model. … … 675 675 toggle_mode_on=toggle_mode_on, 676 676 state=state, 677 update_chisqr=update_chisqr) 677 update_chisqr=update_chisqr, 678 source=source) 678 679 else: 679 680 ## draw model 2D with no initial data … … 689 690 state=state, 690 691 toggle_mode_on=toggle_mode_on, 691 update_chisqr=update_chisqr) 692 update_chisqr=update_chisqr, 693 source=source) 692 694 693 695 def onFit(self, uid): … … 1178 1180 qmin=qmin, qmax=qmax, 1179 1181 update_chisqr=False, 1180 weight=weight) 1182 weight=weight, 1183 source='fit') 1181 1184 1182 1185 def on_set_batch_result(self, page_id, fid, batch_outputs, batch_inputs): … … 1489 1492 weight=None, fid=None, 1490 1493 toggle_mode_on=False, state=None, 1491 data=None, update_chisqr=True ):1494 data=None, update_chisqr=True, source='model'): 1492 1495 """ 1493 1496 Complete plotting 1D data … … 1532 1535 self.page_finder[page_id].set_fit_tab_caption(caption=caption) 1533 1536 try: 1534 if batch_on:1537 if source == 'fit': 1535 1538 # replace model cal to fit calculation if possible 1536 1539 new_plot.y = self.page_finder[page_id].get_result(fid=data.id).theory … … 1575 1578 def _complete2D(self, image, data, model, page_id, elapsed, index, qmin, 1576 1579 qmax, fid=None, weight=None, toggle_mode_on=False, state=None, 1577 update_chisqr=True ):1580 update_chisqr=True, source='model'): 1578 1581 """ 1579 1582 Complete get the result of modelthread and create model 2D … … 1613 1616 title = new_plot.title 1614 1617 batch_on = self.fit_panel.get_page_by_id(page_id).batch_on 1615 if not batch_on:1618 if not source == 'fit': 1616 1619 wx.PostEvent(self.parent, NewPlotEvent(plot=new_plot, 1617 1620 title=title)) … … 1651 1654 weight=None, 1652 1655 toggle_mode_on=False, 1653 update_chisqr=True ):1656 update_chisqr=True, source='model'): 1654 1657 """ 1655 1658 draw model in 2D … … 1681 1684 state=state, 1682 1685 completefn=self._complete2D, 1683 update_chisqr=update_chisqr )1686 update_chisqr=update_chisqr, source=source) 1684 1687 self.calc_2D.queue() 1685 1688 … … 1695 1698 weight=None, 1696 1699 fid=None, 1697 toggle_mode_on=False, update_chisqr=True, 1700 toggle_mode_on=False, update_chisqr=True, source='model', 1698 1701 enable1D=True): 1699 1702 """ … … 1723 1726 completefn=self._complete1D, 1724 1727 #updatefn = self._update1D, 1725 update_chisqr=update_chisqr) 1728 update_chisqr=update_chisqr, 1729 source=source) 1726 1730 self.calc_1D.queue() 1727 1731 except: -
fittingview/src/sans/perspectives/fitting/model_thread.py
rf64a4b7 re3f6ef5 23 23 updatefn=None, 24 24 update_chisqr=True, 25 source='model', 25 26 yieldtime=0.04, 26 27 worktime=0.04 … … 44 45 self.starttime = 0 45 46 self.update_chisqr = update_chisqr 47 self.source = source 46 48 47 49 def compute(self): … … 111 113 weight=self.weight, 112 114 #qstep=self.qstep, 113 update_chisqr = self.update_chisqr) 115 update_chisqr = self.update_chisqr, 116 source=self.source) 114 117 115 118 … … 130 133 completefn = None, 131 134 update_chisqr=True, 135 source='model', 132 136 updatefn=None, 133 137 yieldtime=0.01, … … 152 156 self.starttime = 0 153 157 self.update_chisqr = update_chisqr 158 self.source = source 154 159 155 160 def compute(self): … … 181 186 elapsed=elapsed,index=index, model=self.model, 182 187 data=self.data, 183 update_chisqr = self.update_chisqr) 188 update_chisqr = self.update_chisqr, 189 source=self.source) 184 190 185 191 def results(self):
Note: See TracChangeset
for help on using the changeset viewer.