Changeset 373d1b6 in sasmodels
- Timestamp:
- Feb 18, 2015 6:04:55 AM (10 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 56fc97a
- Parents:
- a503bfd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
compare.py
ra503bfd r373d1b6 299 299 ] 300 300 301 def get_demo_pars(name): 302 import sasmodels.models 303 __import__('sasmodels.models.'+name) 304 model = getattr(sasmodels.models, name) 305 pars = getattr(model, 'demo', None) 306 if pars is None: pars = dict((p[0],p[2]) for p in model.parameters) 307 return pars 308 301 309 def main(): 302 310 opts = [arg for arg in sys.argv[1:] if arg.startswith('-')] … … 320 328 # if model does not define demo parameters 321 329 name = args[0] 322 import sasmodels.models 323 __import__('sasmodels.models.'+name) 324 model = getattr(sasmodels.models, name) 325 pars = getattr(model, 'demo', None) 326 if pars is None: pars = dict((p[0],p[2]) for p in model.parameters) 330 pars = get_demo_pars(name) 327 331 328 332 Nopencl = int(args[1]) if len(args) > 1 else 5
Note: See TracChangeset
for help on using the changeset viewer.