Changeset 232bb12 in sasmodels
- Timestamp:
- Aug 4, 2017 1:21:11 PM (7 years ago)
- 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
- Location:
- sasmodels
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/compare.py
r9f6823b r232bb12 346 346 pd_oriented.append(p.name) 347 347 elif p.length_control is not None: 348 n = pars.get(p.length_control, 1)348 n = int(pars.get(p.length_control, 1) + 0.5) 349 349 pd_volume.extend(p.name+str(k+1) for k in range(n)) 350 350 elif p.length > 1: -
sasmodels/models/mass_fractal.py
r404ebbd r232bb12 28 28 .. math:: 29 29 30 scale = scale\_factor \times NV^2(\rho_ {particle} - \rho_{solvent})^230 scale = scale\_factor \times NV^2(\rho_\text{particle} - \rho_\text{solvent})^2 31 31 32 32 .. math:: … … 35 35 36 36 where $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 scattering38 length density of the solvent, 39 and $\rho_{particle}$ is the scatteringlength density of particles.37 dimension, $\zeta$ is the cut-off length, $\rho_\text{solvent}$ is the scattering 38 length density of the solvent, and $\rho_\text{particle}$ is the scattering 39 length density of particles. 40 40 41 41 .. note:: 42 42 43 43 The mass fractal dimension ( $D_m$ ) is only 44 valid if $ 0< mass\_dim < 6$. It is also only valid over a limited44 valid if $1 < mass\_dim < 6$. It is also only valid over a limited 45 45 $q$ range (see the reference for details). 46 46 … … 92 92 radius = 10**np.random.uniform(0.7, 4) 93 93 cutoff_length = 10**np.random.uniform(0.7, 2)*radius 94 # TODO: fractal dimension should range from 1 to 5 94 95 fractal_dim_mass = 2*np.random.beta(3, 4) + 1 95 96 Vf = 10**np.random.uniform(-4, -1) -
sasmodels/models/mass_surface_fractal.py
r404ebbd r232bb12 91 91 def random(): 92 92 import numpy as np 93 fractal_dim = np.random.uniform( 1, 6)93 fractal_dim = np.random.uniform(0, 6) 94 94 surface_portion = np.random.uniform(0, 1) 95 95 fractal_dim_surf = fractal_dim*surface_portion -
sasmodels/models/porod.py
r4962519 r232bb12 45 45 Iq.vectorized = True # Iq accepts an array of q values 46 46 47 def random(): 48 import numpy as np 49 sld, solvent = np.random.uniform(-0.5, 12, size=2) 50 radius = 10**np.random.uniform(1, 4.7) 51 Vf = 10**np.random.uniform(-3, -1) 52 scale = 1e-4 * Vf * 2*np.pi*(sld-solvent)**2/(3*radius) 53 pars = dict( 54 scale=scale, 55 ) 56 return pars 57 47 58 demo = dict(scale=1.5, background=0.5) 48 59
Note: See TracChangeset
for help on using the changeset viewer.