Changes in src/sas/sasgui/perspectives/fitting/fitting.py [1a8e13f0:4c5098c] in sasview
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/fitting.py
r1a8e13f0 r4c5098c 225 225 226 226 self.id_edit = wx.NewId() 227 editmodel_help = "Edit customized model sample file"228 227 self.menu1.AppendMenu(self.id_edit, "Plugin Model Operations", 229 self.edit_model_menu , editmodel_help)228 self.edit_model_menu) 230 229 #create menubar items 231 230 return [(self.menu1, self.sub_menu)] … … 260 259 self.update_custom_combo() 261 260 if os.path.isfile(p_path): 262 msg = "Sorry! Could not beable to delete the default "263 msg += " custommodel... \n"261 msg = "Sorry! unable to delete the default " 262 msg += "plugin model... \n" 264 263 msg += "Please manually remove the files (.py, .pyc) " 265 264 msg += "in the 'plugin_models' folder \n" … … 274 273 if item.GetLabel() == label: 275 274 self.edit_menu.DeleteItem(item) 276 msg = "The custommodel, %s, has been deleted." % label275 msg = "The plugin model, %s, has been deleted." % label 277 276 evt = StatusEvent(status=msg, type='stop', info='info') 278 277 wx.PostEvent(self.parent, evt) … … 331 330 temp = self.fit_panel.reset_pmodel_list() 332 331 if temp: 333 # Set the new custommodel list for all fit pages332 # Set the new plugin model list for all fit pages 334 333 for uid, page in self.fit_panel.opened_pages.iteritems(): 335 334 if hasattr(page, "formfactorbox"): … … 876 875 enable1D=enable1D, enable2D=enable2D, 877 876 qmin=qmin, qmax=qmax, weight=weight) 877 878 def _mac_sleep(self, sec=0.2): 879 """ 880 Give sleep to MAC 881 """ 882 if ON_MAC: 883 time.sleep(sec) 878 884 879 885 def draw_model(self, model, page_id, data=None, smearer=None, … … 1024 1030 manager=self, 1025 1031 improvement_delta=0.1) 1032 self._mac_sleep(0.2) 1026 1033 1027 1034 # batch fit … … 1263 1270 :param elapsed: time spent at the fitting level 1264 1271 """ 1272 self._mac_sleep(0.2) 1265 1273 uid = page_id[0] 1266 1274 if uid in self.fit_thread_list.keys(): … … 1512 1520 page_id = [] 1513 1521 ## fit more than 1 model at the same time 1522 self._mac_sleep(0.2) 1514 1523 try: 1515 1524 index = 0 … … 1746 1755 data_id="Data " + data.name + " unsmeared", 1747 1756 dy=unsmeared_error) 1748 1749 if sq_model is not None and pq_model is not None: 1750 self.create_theory_1D(x, sq_model, page_id, model, data, state, 1751 data_description=model.name + " S(q)", 1752 data_id=str(page_id) + " " + data.name + " S(q)") 1753 self.create_theory_1D(x, pq_model, page_id, model, data, state, 1754 data_description=model.name + " P(q)", 1755 data_id=str(page_id) + " " + data.name + " P(q)") 1756 1757 # Comment this out until we can get P*S models with correctly populated parameters 1758 #if sq_model is not None and pq_model is not None: 1759 # self.create_theory_1D(x, sq_model, page_id, model, data, state, 1760 # data_description=model.name + " S(q)", 1761 # data_id=str(page_id) + " " + data.name + " S(q)") 1762 # self.create_theory_1D(x, pq_model, page_id, model, data, state, 1763 # data_description=model.name + " P(q)", 1764 # data_id=str(page_id) + " " + data.name + " P(q)") 1757 1765 1758 1766 current_pg = self.fit_panel.get_page_by_id(page_id) … … 1955 1963 ## then kill itself but cannot. Paul Kienzle came up with 1956 1964 ## this fix to prevent threads from stepping on each other 1957 ## which was causing a simple custom model to crash Sasview. 1965 ## which was causing a simple custom plugin model to crash 1966 ##Sasview. 1958 1967 ## We still don't know why the fit sometimes lauched a second 1959 1968 ## thread -- something which should also be investigated.
Note: See TracChangeset
for help on using the changeset viewer.