Changeset ab55943 in sasmodels


Ignore:
Timestamp:
Feb 19, 2015 6:09:06 PM (10 years ago)
Author:
pkienzle
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:
143e2f7
Parents:
68d3c1b
Message:

fix model search in compare_many

File:
1 edited

Legend:

Unmodified
Added
Removed
  • compare_many.py

    rf786ff3 rab55943  
    77from sasmodels.kernelcl import environment 
    88from compare import (MODELS, randomize_model, suppress_pd, eval_sasview, 
    9                      eval_opencl, eval_ctypes, make_data) 
     9                     eval_opencl, eval_ctypes, make_data, get_demo_pars) 
    1010 
    1111def get_stats(target, value, index): 
     
    3131    print(','.join('"%s"'%c for c in columns)) 
    3232 
    33 def compare_instance(model, data, index, N=1, mono=True, cutoff=1e-5): 
    34     name, pars = MODELS[model]() 
     33def compare_instance(name, data, index, N=1, mono=True, cutoff=1e-5): 
     34    pars = get_demo_pars(name) 
    3535    header = '\n"Model","%s","Count","%d"'%(name, N) 
    3636    if not mono: header += ',"Cutoff",%g'%(cutoff,) 
     
    102102 
    103103    data, index = make_data(qmax=1.0, is2D=is2D, Nq=Nq) 
    104     model_list = [model] if model != "all" else list(sorted(MODELS.keys())) 
     104    model_list = [model] if model != "all" else MODELS 
    105105    for model in model_list: 
    106106        compare_instance(model, data, index, N=count, mono=mono, cutoff=cutoff) 
Note: See TracChangeset for help on using the changeset viewer.