Changes in sasmodels/modelinfo.py [5124c969:f88e248] in sasmodels
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/modelinfo.py
r5124c969 rf88e248 230 230 defined as a sublist with the following elements: 231 231 232 *name* is the name that will be used in the call to the kernel 233 function and the name that will be displayed to the user. Names 232 *name* is the name that will be displayed to the user. Names 234 233 should be lower case, with words separated by underscore. If 235 acronyms are used, the whole acronym should be upper case. 234 acronyms are used, the whole acronym should be upper case. For vector 235 parameters, the name will be followed by *[len]* where *len* is an 236 integer length of the vector, or the name of the parameter which 237 controls the length. The attribute *id* will be created from name 238 without the length. 236 239 237 240 *units* should be one of *degrees* for angles, *Ang* for lengths, … … 603 606 # Using the call_parameters table, we already have expanded forms 604 607 # for each of the vector parameters; put them in a lookup table 605 expanded_pars = dict((p.name, p) for p in self.call_parameters) 608 # Note: p.id and p.name are currently identical for the call parameters 609 expanded_pars = dict((p.id, p) for p in self.call_parameters) 606 610 607 611 def append_group(name): … … 730 734 info.docs = kernel_module.__doc__ 731 735 info.category = getattr(kernel_module, 'category', None) 736 info.single = getattr(kernel_module, 'single', True) 737 info.opencl = getattr(kernel_module, 'opencl', True) 732 738 info.structure_factor = getattr(kernel_module, 'structure_factor', False) 733 739 info.profile_axes = getattr(kernel_module, 'profile_axes', ['x', 'y']) … … 743 749 info.profile = getattr(kernel_module, 'profile', None) # type: ignore 744 750 info.sesans = getattr(kernel_module, 'sesans', None) # type: ignore 745 # Default single and opencl to True for C models. Python models have callable Iq.746 info.opencl = getattr(kernel_module, 'opencl', not callable(info.Iq))747 info.single = getattr(kernel_module, 'single', not callable(info.Iq))748 751 749 752 # multiplicity info
Note: See TracChangeset
for help on using the changeset viewer.