Changeset 404ebbd in sasmodels for sasmodels/models/sphere.py


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/sphere.py

    r925ad6e r404ebbd  
    8484    return radius 
    8585 
     86def random(): 
     87    import numpy as np 
     88    Vf = 10**np.random.uniform(-4, -2) 
     89    radius = 10**np.random.uniform(1.3, 4) 
     90    V = radius**3 
     91    pars = dict( 
     92        #background=0, sld=1, sld_solvent=0, 
     93        scale=1e10*Vf/V, 
     94        radius=radius, 
     95    ) 
     96    return pars 
     97 
    8698# VR defaults to 1.0 
    8799 
Note: See TracChangeset for help on using the changeset viewer.