Changeset 8f04da4 in sasmodels for sasmodels/models/binary_hard_sphere.py
- Timestamp:
- Aug 2, 2017 12:53:56 AM (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:
- bd21b12
- Parents:
- 1511c37c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/binary_hard_sphere.py
r925ad6e r8f04da4 110 110 source = ["lib/sas_3j1x_x.c", "binary_hard_sphere.c"] 111 111 112 def random(): 113 import numpy as np 114 # TODO: binary_hard_sphere fails at low qr 115 radius_lg = 10**np.random.uniform(2, 4.7) 116 radius_sm = 10**np.random.uniform(2, 4.7) 117 volfraction_lg = 10**np.random.uniform(-3, -0.3) 118 volfraction_sm = 10**np.random.uniform(-3, -0.3) 119 # TODO: Get slightly different results if large and small are swapped 120 # modify the model so it doesn't care which is which 121 if radius_lg < radius_sm: 122 radius_lg, radius_sm = radius_sm, radius_lg 123 volfraction_lg, volfraction_sm = volfraction_sm, volfraction_lg 124 pars = dict( 125 radius_lg=radius_lg, 126 radius_sm=radius_sm, 127 volfraction_lg=volfraction_lg, 128 volfraction_sm=volfraction_sm, 129 ) 130 return pars 131 112 132 # parameters for demo and documentation 113 133 demo = dict(sld_lg=3.5, sld_sm=0.5, sld_solvent=6.36,
Note: See TracChangeset
for help on using the changeset viewer.