Changeset 19e614a in sasview for fittingview/src/sans/perspectives/fitting/models.py
- Timestamp:
- May 2, 2012 9:03:55 AM (13 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:
- 3aab96b
- Parents:
- 6246e00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fittingview/src/sans/perspectives/fitting/models.py
rf32d144 r19e614a 107 107 if not p_dir: 108 108 raise 109 110 109 # Place example user models as needed 111 for file in os.listdir(p_dir): 112 file_path = os.path.join(p_dir, file) 113 if os.path.isfile(file_path): 114 if file.split(".")[-1] == 'py' and\ 115 file.split(".")[0] != '__init__': 116 if not os.path.isfile(os.path.join(dir, file)): 117 shutil.copy(file_path, dir) 110 if os.path.isdir(p_dir): 111 for file in os.listdir(p_dir): 112 file_path = os.path.join(p_dir, file) 113 if os.path.isfile(file_path): 114 if file.split(".")[-1] == 'py' and\ 115 file.split(".")[0] != '__init__': 116 if not os.path.isfile(os.path.join(dir, file)): 117 shutil.copy(file_path, dir) 118 118 119 return dir 119 120 … … 572 573 573 574 from sans.models.ReflectivityModel import ReflectivityModel 575 self.shape_indep_list.append(ReflectivityModel) 574 576 self.multi_func_list.append(ReflectivityModel) 575 577 576 578 from sans.models.ReflectivityIIModel import ReflectivityIIModel 579 self.shape_indep_list.append(ReflectivityIIModel) 577 580 self.multi_func_list.append(ReflectivityIIModel) 578 581 … … 580 583 self.stored_plugins = self.findModels() 581 584 self.plugins = self.stored_plugins.values() 582 self.plugins.append(ReflectivityModel) 583 self.plugins.append(ReflectivityIIModel) 585 584 586 self._get_multifunc_models() 585 587 … … 630 632 self.stored_plugins[name] = plug 631 633 self.plugins.append(plug) 632 from sans.models.ReflectivityModel import ReflectivityModel 633 from sans.models.ReflectivityIIModel import ReflectivityIIModel 634 self.plugins.append(ReflectivityModel) 635 self.plugins.append(ReflectivityIIModel) 634 636 635 self.model_combobox.reset_list("Customized Models", self.plugins) 637 636 return self.model_combobox.get_list()
Note: See TracChangeset
for help on using the changeset viewer.