Changeset b2d9826 in sasview for sansview/perspectives/fitting/models.py
- Timestamp:
- Mar 11, 2011 12:14:57 PM (14 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:
- a3149c5
- Parents:
- aae7a8d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/models.py
r6bbeacd4 rb2d9826 78 78 """ 79 79 # List of plugin objects 80 plugins = []80 plugins = {} 81 81 # Go through files in plug-in directory 82 82 try: … … 95 95 try: 96 96 if _check_plugin(module.Model, name)!=None: 97 plugins .append(module.Model)97 plugins[name] = module.Model 98 98 except: 99 99 msg="Error accessing Model" … … 150 150 struct_factor_dict = {} 151 151 ##list of form factors 152 shape_list = []152 shape_list = [] 153 153 ## independent shape model list 154 154 shape_indep_list = [] 155 155 ##list of structure factors 156 struct_list = []156 struct_list = [] 157 157 ##list of model allowing multiplication 158 multiplication_factor =[]158 multiplication_factor = [] 159 159 ##list of multifunctional shapes 160 multi_func_list = []160 multi_func_list = [] 161 161 ## list of added models 162 plugins =[]162 plugins = [] 163 163 ## Event owner (guiframe) 164 164 event_owner = None … … 166 166 """ 167 167 """ 168 self.stored_plugins = {} 168 169 self._getModelList() 169 170 … … 388 389 389 390 #Looking for plugins 390 self. plugins = findModels()391 self. _get_multifunc_models()391 self.stored_plugins = findModels() 392 self.plugins = self.stored_plugins.values() 392 393 self.plugins.append(ReflectivityModel) 393 394 self.plugins.append(ReflectivityIIModel) 395 self._get_multifunc_models() 396 394 397 return 0 395 398 396 399 400 def update(self): 401 """ 402 """ 403 new_plugins = findModels() 404 for name, plug in new_plugins.iteritems(): 405 if name not in self.stored_plugins.keys(): 406 self.stored_plugins[name] = plug 407 self.plugins.append(plug) 408 self.model_combobox.set_list("Customized Models", self.plugins) 409 return self.model_combobox.get_list() 410 397 411 def populate_menu(self, modelmenu, event_owner): 398 412 """ … … 563 577 self.model_combobox.set_list("multiplication", self.multiplication_factor) 564 578 self.model_combobox.set_list("Multi-Functions", self.multi_func_list) 565 return self.model_combobox 579 return self.model_combobox.get_list() 566 580 567 581
Note: See TracChangeset
for help on using the changeset viewer.