Changeset 6fe5100 in sasview for src/sans/perspectives
- Timestamp:
- Apr 6, 2014 7:29:59 AM (11 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:
- 95d58d3
- Parents:
- 960fdbb
- Location:
- src/sans/perspectives/fitting
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sans/perspectives/fitting/basepage.py
r27b7acc r6fe5100 808 808 infor = "warning" 809 809 else: 810 msg = "Error was occured"811 msg += " :No valid parameter values to paste from the clipboard..."810 msg = "Error occured: " 811 msg += "No valid parameter values to paste from the clipboard..." 812 812 infor = "error" 813 813 wx.PostEvent(self._manager.parent, … … 2149 2149 else: 2150 2150 tcrtl.SetBackgroundColour("pink") 2151 msg = "Model Error: wrong value entered: %s" % sys.exc_value2151 msg = "Model Error: wrong value entered: %s" % sys.exc_value 2152 2152 wx.PostEvent(self.parent, StatusEvent(status=msg)) 2153 2153 return 2154 2154 except: 2155 2155 tcrtl.SetBackgroundColour("pink") 2156 msg = "Model Error: wrong value entered: %s" % sys.exc_value2156 msg = "Model Error: wrong value entered: %s" % sys.exc_value 2157 2157 wx.PostEvent(self.parent, StatusEvent(status=msg)) 2158 2158 return … … 2165 2165 #is_modified = True 2166 2166 else: 2167 msg = "Cannot Plot :No npts in that Qrange!!! "2167 msg = "Cannot plot: No points in Q range!!! " 2168 2168 wx.PostEvent(self.parent, StatusEvent(status=msg)) 2169 2169 else: 2170 2170 tcrtl.SetBackgroundColour("pink") 2171 msg = "Model Error: wrong value entered!!!"2171 msg = "Model Error: wrong value entered!!!" 2172 2172 wx.PostEvent(self.parent, StatusEvent(status=msg)) 2173 2173 self.save_current_state() … … 2206 2206 else: 2207 2207 tcrtl.SetBackgroundColour("pink") 2208 msg = "Model Error: wrong value entered: %s" % sys.exc_value2208 msg = "Model Error: wrong value entered: %s" % sys.exc_value 2209 2209 wx.PostEvent(self._manager.parent, StatusEvent(status=msg)) 2210 2210 return 2211 2211 except: 2212 2212 tcrtl.SetBackgroundColour("pink") 2213 msg = "Model Error: wrong value entered: %s" % sys.exc_value2213 msg = "Model Error: wrong value entered: %s" % sys.exc_value 2214 2214 wx.PostEvent(self._manager.parent, StatusEvent(status=msg)) 2215 2215 return … … 2222 2222 is_modified = True 2223 2223 else: 2224 msg = "Cannot Plot :No npts in that Qrange!!! "2224 msg = "Cannot Plot: No points in Q range!!! " 2225 2225 wx.PostEvent(self._manager.parent, StatusEvent(status=msg)) 2226 2226 else: 2227 2227 tcrtl.SetBackgroundColour("pink") 2228 msg = "Model Error: wrong value entered!!!"2228 msg = "Model Error: wrong value entered!!!" 2229 2229 wx.PostEvent(self._manager.parent, StatusEvent(status=msg)) 2230 2230 self.save_current_state() … … 2397 2397 self.qmax.SetBackgroundColour("pink") 2398 2398 self.qmax.Refresh() 2399 msg = " Npts of Data Error :"2400 msg += " No or too little npts of%s." % data.name2399 msg = "Data Error: " 2400 msg += "Too few points in %s." % data.name 2401 2401 wx.PostEvent(self._manager.parent, StatusEvent(status=msg)) 2402 2402 self.fitrange = False … … 2432 2432 self.qmax.SetBackgroundColour("pink") 2433 2433 self.qmax.Refresh() 2434 msg = " Npts of Data Error :"2435 msg += " No or too little npts of%s." % data.name2434 msg = "Data Error: " 2435 msg += "Too few points in %s." % data.name 2436 2436 wx.PostEvent(self._manager.parent, StatusEvent(status=msg)) 2437 2437 self.fitrange = False … … 2484 2484 2485 2485 except: 2486 msg = "Wrong Fit parameter range entered"2486 msg = "Wrong fit parameter range entered" 2487 2487 wx.PostEvent(self._manager.parent, 2488 2488 StatusEvent(status=msg)) -
src/sans/perspectives/fitting/console.py
r5777106 r6fe5100 5 5 import time 6 6 import wx 7 import park 8 from park.fitresult import FitHandler 7 from sans.fit import FitHandler 9 8 10 9 class ConsoleUpdate(FitHandler): -
src/sans/perspectives/fitting/fitting.py
r767514a r6fe5100 111 111 self.scipy_id = wx.NewId() 112 112 self.park_id = wx.NewId() 113 self.bumps_id = wx.NewId() 113 114 self.menu1 = None 114 115 self.new_model_frame = None … … 198 199 wx.EVT_MENU(owner, self.park_id, self._onset_engine_park) 199 200 201 bumps_help = "Bumps: fitting and uncertainty analysis. More in Help window...." 202 self.menu1.AppendCheckItem(self.bumps_id, "Bumps fit", 203 bumps_help) 204 wx.EVT_MENU(owner, self.bumps_id, self._onset_engine_bumps) 205 200 206 self.menu1.FindItemById(self.scipy_id).Check(True) 201 207 self.menu1.FindItemById(self.park_id).Check(False) 208 self.menu1.FindItemById(self.bumps_id).Check(False) 202 209 self.menu1.AppendSeparator() 203 210 self.id_tol = wx.NewId() … … 207 214 ftol_help) 208 215 wx.EVT_MENU(owner, self.id_tol, self.show_ftol_dialog) 216 217 self.id_bumps_options = wx.NewId() 218 bopts_help = "Bumps fitting options" 219 self.menu1.Append(self.id_bumps_options, 'Bumps &Options', bopts_help) 220 wx.EVT_MENU(owner, self.id_bumps_options, self.on_bumps_options) 221 self.bumps_options_menu = self.menu1.FindItemById(self.id_bumps_options) 222 self.bumps_options_menu.Enable(True) 209 223 self.menu1.AppendSeparator() 210 224 … … 819 833 dialog.Destroy() 820 834 835 def on_bumps_options(self, event=None): 836 from bumps.gui.fit_dialog import OpenFitOptions 837 OpenFitOptions() 838 821 839 def stop_fit(self, uid): 822 840 """ … … 959 977 self._gui_engine = self._return_engine_type() 960 978 self.fitproblem_count = fitproblem_count 961 if self._fit_engine == "park":979 if self._fit_engine in ("park","bumps"): 962 980 engineType = "Simultaneous Fit" 963 981 else: … … 1682 1700 self._on_change_engine('scipy') 1683 1701 1702 def _onset_engine_bumps(self, event): 1703 """ 1704 set engine to bumps 1705 """ 1706 self._on_change_engine('bumps') 1707 1684 1708 def _on_slicer_event(self, event): 1685 1709 """ … … 1733 1757 self.menu1.FindItemById(self.park_id).Check(True) 1734 1758 self.menu1.FindItemById(self.scipy_id).Check(False) 1759 self.menu1.FindItemById(self.bumps_id).Check(False) 1760 elif engine == "scipy": 1761 self.menu1.FindItemById(self.park_id).Check(False) 1762 self.menu1.FindItemById(self.scipy_id).Check(True) 1763 self.menu1.FindItemById(self.bumps_id).Check(False) 1735 1764 else: 1736 1765 self.menu1.FindItemById(self.park_id).Check(False) 1737 self.menu1.FindItemById(self.scipy_id).Check(True) 1766 self.menu1.FindItemById(self.scipy_id).Check(False) 1767 self.menu1.FindItemById(self.bumps_id).Check(True) 1738 1768 ## post a message to status bar 1739 1769 msg = "Engine set to: %s" % self._fit_engine
Note: See TracChangeset
for help on using the changeset viewer.