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


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

tuned random model generation for even more models

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/gauss_lorentz_gel.py

    ra807206 r48462b0  
    33but typically a physical rather than chemical network. 
    44It is modeled as a sum of a low-q exponential decay (which happens to 
    5 give a functional form similar to Guinier scattering, so interpret with  
     5give a functional form similar to Guinier scattering, so interpret with 
    66care) plus a Lorentzian at higher-q values. See also the gel_fit model. 
    77 
     
    8888 
    8989 
     90def random(): 
     91    import numpy as np 
     92    gauss_scale = 10**np.random.uniform(1, 3) 
     93    lorentz_scale = 10**np.random.uniform(1, 3) 
     94    cor_length_static = 10**np.random.uniform(0, 3) 
     95    cor_length_dynamic = 10**np.random.uniform(0, 3) 
     96    pars = dict( 
     97        #background=0, 
     98        scale=1, 
     99        gauss_scale=gauss_scale, 
     100        lorentz_scale=lorentz_scale, 
     101        cor_length_static=cor_length_static, 
     102        cor_length_dynamic=cor_length_dynamic, 
     103    ) 
     104    return pars 
     105 
     106 
    90107demo = dict(scale=1, background=0.1, 
    91108            gauss_scale=100.0, 
Note: See TracChangeset for help on using the changeset viewer.