Changeset 48462b0 in sasmodels for sasmodels/models/teubner_strey.py


Ignore:
Timestamp:
Jul 31, 2017 1:24:42 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:
109d963
Parents:
404ebbd
Message:

tuned random model generation for even more models

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/teubner_strey.py

    r8393c74 r48462b0  
    102102Iq.vectorized = True  # Iq accepts an array of q values 
    103103 
     104def random(): 
     105    import numpy as np 
     106    d = 10**np.random.uniform(1, 4) 
     107    xi = 10**np.random.uniform(-0.3, 2)*d 
     108    pars = dict( 
     109        #background=0, 
     110        scale=100, 
     111        volfraction_a=10**np.random.uniform(-3, 0), 
     112        sld_a=np.random.uniform(-0.5, 12), 
     113        sld_b=np.random.uniform(-0.5, 12), 
     114        d=d, 
     115        xi=xi, 
     116    ) 
     117    return pars 
     118 
    104119demo = dict(scale=1, background=0, volfraction_a=0.5, 
    105                      sld_a=0.3, sld_b=6.3, 
    106                      d=100.0, xi=30.0) 
     120            sld_a=0.3, sld_b=6.3, 
     121            d=100.0, xi=30.0) 
    107122tests = [[{}, 0.06, 41.5918888453]] 
Note: See TracChangeset for help on using the changeset viewer.