Changeset 8f04da4 in sasmodels for sasmodels/models/linear_pearls.py


Ignore:
Timestamp:
Aug 2, 2017 2:53:56 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:
bd21b12
Parents:
1511c37c
Message:

tuned random model generation for more models

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/linear_pearls.py

    rc3ccaec r8f04da4  
    6565source = ["lib/sas_3j1x_x.c", "linear_pearls.c"] 
    6666 
    67 demo = dict(scale=1.0, background=0.0, 
    68             radius=80.0, 
    69             edge_sep=350.0, 
    70             num_pearls=3, 
    71             sld=1.0, 
    72             sld_solvent=6.3) 
     67def random(): 
     68    import numpy as np 
     69    radius = 10**np.random.uniform(1, 3) # 1 - 1000 
     70    edge_sep = 10**np.random.uniform(0, 3)  # 1 - 1000 
     71    num_pearls = np.round(10**np.random.uniform(0.3, 3)) # 2 - 1000 
     72    pars = dict( 
     73        radius=radius, 
     74        edge_sep=edge_sep, 
     75        num_pearls=num_pearls, 
     76    ) 
     77    return pars 
    7378 
    7479""" 
Note: See TracChangeset for help on using the changeset viewer.