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

    r31df0c9 r8f04da4  
    154154    import numpy as np 
    155155    V = 10**np.random.uniform(5, 12) 
    156     radius_polar = 10**np.random.uniform(1.3, 4) 
    157     radius_equatorial = np.sqrt(V/radius_polar) # ignore 4/3 pi 
    158     thickness_polar = np.random.uniform(0.01, 1)*radius_polar 
    159     thickness_equatorial = np.random.uniform(0.01, 1)*radius_equatorial 
    160     radius_polar -= thickness_polar 
    161     radius_equatorial -= thickness_equatorial 
     156    outer_polar = 10**np.random.uniform(1.3, 4) 
     157    outer_equatorial = np.sqrt(V/radius_polar) # ignore 4/3 pi 
     158    # Use a distribution with a preference for thin shell or thin core 
     159    # Avoid core,shell radii < 1 
     160    thickness_polar = np.random.beta(0.5, 0.5)*(outer__polar-2) + 1 
     161    thickness_equatorial = np.random.beta(0.5, 0.5)*(outer_equatorial-2) + 1 
     162    radius_polar = outer_polar - thickness_polar 
     163    radius_equatorial = outer_equatorial - thickness_equatorial 
    162164    x_core = radius_polar/radius_equatorial 
    163165    x_polar_shell = thickness_polar/thickness_equatorial 
Note: See TracChangeset for help on using the changeset viewer.