- Timestamp:
- May 19, 2014 5:30:19 PM (10 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:
- 85a3b46
- Parents:
- 4a0dc427
- Location:
- src/sans
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sans/fit/BumpsFitting.py
r4a0dc427 reff93b8 196 196 handler.update_fit(last=True) 197 197 198 # TODO: shouldn't reference internal parameters 198 # TODO: shouldn't reference internal parameters of fit problem 199 199 varying = problem._parameters 200 200 # collect the results … … 208 208 R.residuals = fitness.residuals() 209 209 R.fitter_id = self.fitter_id 210 # TODO: should scale stderr by sqrt(chisq/DOF) if dy is unknown 210 211 R.stderr = result['stderr'][fitted_index] 211 212 R.pvec = result['value'][fitted_index] -
src/sans/perspectives/fitting/fitpanel.py
rb6a181b reff93b8 64 64 self.sim_page = None 65 65 self.batch_page = None 66 self.fit_engine_type = " scipy"66 self.fit_engine_type = "bumps" 67 67 ## get the state of a page 68 68 self.Bind(basepage.EVT_PAGE_INFO, self._onGetstate) -
src/sans/perspectives/fitting/fitting.py
r4e9f227 reff93b8 45 45 from sans.guiframe.gui_manager import MDIFrame 46 46 47 # TODO: remove globals from interface to bumps options! 48 # Default bumps to use the levenberg-marquardt optimizer 49 import bumps.fitters 50 bumps.fitters.FIT_DEFAULT = 'lm' 51 47 52 MAX_NBR_DATA = 4 48 53 SANS_F_TOL = 5e-05 … … 80 85 # Start with a good default 81 86 self.elapsed = 0.022 82 # the type of optimizer selected, park or scipy83 self.fitter = None84 87 self.fit_panel = None 85 88 #let fit ready … … 90 93 self.closed_page_dict = {} 91 94 ## Fit engine 92 self._fit_engine = ' scipy'95 self._fit_engine = 'bumps' 93 96 self._gui_engine = None 94 97 ## Relative error desired in the sum of squares (float); scipy only … … 206 209 wx.EVT_MENU(owner, self.bumps_id, self._onset_engine_bumps) 207 210 208 self.menu1.FindItemById(self.scipy_id).Check( True)209 self.menu1.FindItemById(self.park_id).Check( False)210 self.menu1.FindItemById(self.bumps_id).Check( False)211 self.menu1.FindItemById(self.scipy_id).Check(self._fit_engine=="scipy") 212 self.menu1.FindItemById(self.park_id).Check(self._fit_engine=="park") 213 self.menu1.FindItemById(self.bumps_id).Check(self._fit_engine=="bumps") 211 214 self.menu1.AppendSeparator() 212 215 self.id_tol = wx.NewId() … … 986 989 if value.get_scheduled() == 1: 987 990 fitproblem_count += 1 988 self._gui_engine = self._return_engine_type() 991 # Remember the user selected fit engine before the fit. Simultaneous 992 # fitting may change the selected engine, so it needs to be restored 993 # when the fit is complete. 994 self._gui_engine = self._fit_engine 989 995 self.fitproblem_count = fitproblem_count 990 996 if self._fit_engine in ("park","bumps"): … … 1751 1757 break 1752 1758 1753 def _return_engine_type(self):1754 """1755 return the current type of engine1756 """1757 return self._fit_engine1758 1759 1759 def _on_change_engine(self, engine='park'): 1760 1760 """
Note: See TracChangeset
for help on using the changeset viewer.