Ignore:
Timestamp:
Jul 30, 2017 12:56:22 AM (7 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
48462b0
Parents:
a151caa
Message:

tuned random model generation for more models

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/polymer_excl_volume.py

    r40a87fa r404ebbd  
    108108#   ["name", "units", default, [lower, upper], "type", "description"], 
    109109parameters = [ 
    110     ["rg",        "Ang", 60.0, [0, inf],    "", "Radius of Gyration"], 
    111     ["porod_exp", "",     3.0, [-inf, inf], "", "Porod exponent"], 
     110    ["rg",        "Ang", 60.0, [0, inf], "", "Radius of Gyration"], 
     111    ["porod_exp", "",     3.0, [0, inf], "", "Porod exponent"], 
    112112] 
    113113# pylint: enable=bad-whitespace, line-too-long 
     
    133133Iq.vectorized = True  # Iq accepts an array of q values 
    134134 
     135def random(): 
     136    import numpy as np 
     137    rg = 10**np.random.uniform(0, 4) 
     138    porod_exp = np.random.uniform(1e-3, 6) 
     139    scale = 10**np.random.uniform(1, 5) 
     140    pars = dict( 
     141        #background=0, 
     142        scale=scale, 
     143        rg=rg, 
     144        porod_exp=porod_exp, 
     145    ) 
     146    return pars 
     147 
    135148tests = [ 
    136149    # Accuracy tests based on content in test/polyexclvol_default_igor.txt 
Note: See TracChangeset for help on using the changeset viewer.