Changes in / [87fce00:f173599] in sasmodels
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
compare.py
r87fce00 r373d1b6 301 301 ] 302 302 303 def get_demo_pars(name): 304 import sasmodels.models 305 __import__('sasmodels.models.'+name) 306 model = getattr(sasmodels.models, name) 307 pars = getattr(model, 'demo', None) 308 if pars is None: pars = dict((p[0],p[2]) for p in model.parameters) 309 return pars 310 303 311 def main(): 304 312 opts = [arg for arg in sys.argv[1:] if arg.startswith('-')] … … 322 330 # if model does not define demo parameters 323 331 name = args[0] 324 import sasmodels.models 325 __import__('sasmodels.models.'+name) 326 model = getattr(sasmodels.models, name) 327 pars = getattr(model, 'demo', None) 328 if pars is None: pars = dict((p[0],p[2]) for p in model.parameters) 332 pars = get_demo_pars(name) 329 333 330 334 Nopencl = int(args[1]) if len(args) > 1 else 5
Note: See TracChangeset
for help on using the changeset viewer.