Changes in sasmodels/modelinfo.py [65314f7:0bdddc2] in sasmodels
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/modelinfo.py
r65314f7 r0bdddc2 467 467 if p.polydisperse and p.type not in ('orientation', 'magnetic')) 468 468 self.pd_2d = set(p.name for p in self.call_parameters if p.polydisperse) 469 470 def __getitem__(self, key): 471 # Find the parameter definition 472 for par in self.call_parameters: 473 if par.name == key: 474 break 475 else: 476 raise KeyError("unknown parameter %r"%key) 477 return par 469 478 470 479 def _set_vector_lengths(self): … … 718 727 models when the model is first called, not when the model is loaded. 719 728 """ 720 if hasattr(kernel_module, "model_info"):721 # Custom sum/multi models722 return kernel_module.model_info723 729 info = ModelInfo() 724 730 #print("make parameter table", kernel_module.parameters) … … 757 763 info.opencl = getattr(kernel_module, 'opencl', not callable(info.Iq)) 758 764 info.single = getattr(kernel_module, 'single', not callable(info.Iq)) 765 info.random = getattr(kernel_module, 'random', None) 759 766 760 767 # multiplicity info
Note: See TracChangeset
for help on using the changeset viewer.