Changeset 232bb12 in sasmodels for sasmodels/models/mass_fractal.py


Ignore:
Timestamp:
Aug 4, 2017 1:21:11 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:
bb39b4a
Parents:
9f6823b
Message:

tuned random model generation for models

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/mass_fractal.py

    r404ebbd r232bb12  
    2828.. math:: 
    2929 
    30     scale = scale\_factor \times NV^2(\rho_{particle} - \rho_{solvent})^2 
     30    scale = scale\_factor \times NV^2(\rho_\text{particle} - \rho_\text{solvent})^2 
    3131 
    3232.. math:: 
     
    3535 
    3636where $R$ is the radius of the building block, $D_m$ is the **mass** fractal 
    37 dimension, | \zeta\|  is the cut-off length, $\rho_{solvent}$ is the scattering 
    38 length density of the solvent, 
    39 and $\rho_{particle}$ is the scattering length density of particles. 
     37dimension, $\zeta$  is the cut-off length, $\rho_\text{solvent}$ is the scattering 
     38length density of the solvent, and $\rho_\text{particle}$ is the scattering 
     39length density of particles. 
    4040 
    4141.. note:: 
    4242 
    4343    The mass fractal dimension ( $D_m$ ) is only 
    44     valid if $0 < mass\_dim < 6$. It is also only valid over a limited 
     44    valid if $1 < mass\_dim < 6$. It is also only valid over a limited 
    4545    $q$ range (see the reference for details). 
    4646 
     
    9292    radius = 10**np.random.uniform(0.7, 4) 
    9393    cutoff_length = 10**np.random.uniform(0.7, 2)*radius 
     94    # TODO: fractal dimension should range from 1 to 5 
    9495    fractal_dim_mass = 2*np.random.beta(3, 4) + 1 
    9596    Vf = 10**np.random.uniform(-4, -1) 
Note: See TracChangeset for help on using the changeset viewer.