Ignore:
Timestamp:
Aug 2, 2017 12: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/hollow_rectangular_prism.py

    r31df0c9 r8f04da4  
    149149    import numpy as np 
    150150    a, b, c = 10**np.random.uniform(1, 4.7, size=3) 
    151     thickness = np.random.uniform(0.01, 0.49) * min(a, b, c) 
     151    # Thickness is limited to 1/2 the smallest dimension 
     152    # Use a distribution with a preference for thin shell or thin core 
     153    # Avoid core,shell radii < 1 
     154    min_dim = 0.5*min(a, b, c) 
     155    thickness = np.random.beta(0.5, 0.5)*(min_dim-2) + 1 
     156    #print(a, b, c, thickness, thickness/min_dim) 
    152157    pars = dict( 
    153158        length_a=a, 
Note: See TracChangeset for help on using the changeset viewer.