Ignore:
Timestamp:
Aug 1, 2017 4:38:47 PM (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:
1511c37c
Parents:
d49ca5c
Message:

tuned random model generation for more models

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/flexible_cylinder_elliptical.py

    r40a87fa r31df0c9  
    112112          "flexible_cylinder_elliptical.c"] 
    113113 
    114 demo = dict(scale=1.0, background=0.0001, 
    115             length=1000.0, 
    116             kuhn_length=100.0, 
    117             radius=20.0, 
    118             axis_ratio=1.5, 
    119             sld=1.0, 
    120             sld_solvent=6.3) 
     114def random(): 
     115    import numpy as np 
     116    length = 10**np.random.uniform(2, 6) 
     117    radius = 10**np.random.uniform(1, 3) 
     118    axis_ratio = 10**np.random.uniform(-1, 1) 
     119    kuhn_length = 10**np.random.uniform(-2, -0.7)*length  # at least 10 segments 
     120    pars = dict( 
     121        length=length, 
     122        radius=radius, 
     123        axis_ratio=axis_ratio, 
     124        kuhn_length=kuhn_length, 
     125    ) 
     126    return pars 
    121127 
    122128tests = [ 
Note: See TracChangeset for help on using the changeset viewer.