Changeset 225aca8 in sasview for src/sas/perspectives/fitting/fitting.py
- Timestamp:
- Jul 28, 2015 12:14:38 PM (9 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:
- a910c788
- Parents:
- ae2a197 (diff), d06c34c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/perspectives/fitting/fitting.py
r098f3d2 r225aca8 61 61 Fitting plugin is used to perform fit 62 62 """ 63 def __init__(self , standalone=False):64 PluginBase.__init__(self, name="Fitting" , standalone=standalone)63 def __init__(self): 64 PluginBase.__init__(self, name="Fitting") 65 65 66 66 #list of panel to send to guiframe … … 221 221 Get the python editor panel 222 222 """ 223 id = event.GetId()224 label = self.edit_menu.GetLabel( id)223 event_id = event.GetId() 224 label = self.edit_menu.GetLabel(event_id) 225 225 from sas.perspectives.calculator.pyconsole import PyConsole 226 226 filename = os.path.join(models.find_plugins_dir(), label) … … 236 236 Delete custom model file 237 237 """ 238 id = event.GetId()239 label = self.delete_menu.GetLabel( id)238 event_id = event.GetId() 239 label = self.delete_menu.GetLabel(event_id) 240 240 toks = os.path.splitext(label) 241 241 path = os.path.join(models.find_plugins_dir(), toks[0]) … … 256 256 # info='warning')) 257 257 else: 258 self.delete_menu.Delete( id)258 self.delete_menu.Delete(event_id) 259 259 for item in self.edit_menu.GetMenuItems(): 260 260 if item.GetLabel() == label: … … 272 272 Edit summodel template and make one 273 273 """ 274 id = event.GetId()274 event_id = event.GetId() 275 275 model_manager = models.ModelManager() 276 276 model_list = model_manager.get_model_name_list() … … 290 290 self.new_model_frame.Show(True) 291 291 else: 292 id = event.GetId()292 event_id = event.GetId() 293 293 dir_path = models.find_plugins_dir() 294 294 title = "New Custom Model Function" … … 332 332 Set list of the edit model menu labels 333 333 """ 334 id = wx.NewId()334 wx_id = wx.NewId() 335 335 #new_model_menu = wx.Menu() 336 self.edit_model_menu.Append( id, 'New',336 self.edit_model_menu.Append(wx_id, 'New', 337 337 'Add a new model function') 338 wx.EVT_MENU(owner, id, self.make_new_model)339 id = wx.NewId()340 self.edit_model_menu.Append( id, 'Sum|Multi(p1, p2)',338 wx.EVT_MENU(owner, wx_id, self.make_new_model) 339 wx_id = wx.NewId() 340 self.edit_model_menu.Append(wx_id, 'Sum|Multi(p1, p2)', 341 341 'Sum of two model functions') 342 wx.EVT_MENU(owner, id, self.make_sum_model)342 wx.EVT_MENU(owner, wx_id, self.make_sum_model) 343 343 e_id = wx.NewId() 344 344 self.edit_menu = wx.Menu() … … 376 376 has_file = True 377 377 if not has_file: 378 id = wx.NewId()379 submenu.Append( id, name)380 wx.EVT_MENU(owner, id, menu)378 wx_id = wx.NewId() 379 submenu.Append(wx_id, name) 380 wx.EVT_MENU(owner, wx_id, menu) 381 381 has_file = False 382 382 … … 397 397 Create a page to access simultaneous fit option 398 398 """ 399 id = event.GetId()399 event_id = event.GetId() 400 400 caption = "Const & Simul Fit" 401 401 page = self.sim_page 402 if id == self.id_batchfit:402 if event_id == self.id_batchfit: 403 403 caption = "Combined Batch" 404 404 page = self.batch_page … … 719 719 for uid, value in self.page_finder.iteritems(): 720 720 if uid != sim_page_id and uid != self.batch_page.uid: 721 list = value.get_model()722 model = list[0]721 model_list = value.get_model() 722 model = model_list[0] 723 723 if model.name == modelname: 724 724 value.set_model_param(names, values) … … 1568 1568 """ 1569 1569 if event.panel is not None: 1570 new_panel = event.panel1571 1570 self.slicer_panels.append(event.panel) 1572 1571 # Set group ID if available … … 1652 1651 #find if this theory was already plotted and replace that plot given 1653 1652 #the same id 1654 theory_data =self.page_finder[page_id].get_theory_data(fid=data.id)1653 self.page_finder[page_id].get_theory_data(fid=data.id) 1655 1654 1656 1655 if data.is_data:
Note: See TracChangeset
for help on using the changeset viewer.