Changeset 404ebbd in sasmodels for sasmodels/models/peak_lorentz.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/peak_lorentz.py

    r2c74c11 r404ebbd  
    5959Iq.vectorized = True  # Iq accepts an array of q values 
    6060 
     61def random(): 
     62    import numpy as np 
     63    peak_pos = 10**np.random.uniform(-3, -1) 
     64    peak_hwhm = peak_pos * 10**np.random.uniform(-3, 0) 
     65    pars = dict( 
     66        #background=0, 
     67        scale=10**np.random.uniform(2, 6), 
     68        peak_pos=peak_pos, 
     69        peak_hwhm=peak_hwhm, 
     70    ) 
     71    return pars 
     72 
    6173demo = dict(scale=100, background=1.0, 
    6274            peak_pos=0.05, peak_hwhm=0.005) 
Note: See TracChangeset for help on using the changeset viewer.