Changeset 6530963 in sasmodels for sasmodels/models/bcc_paracrystal.py
- Timestamp:
- Sep 9, 2018 6:46:10 AM (6 years ago)
- Branches:
- ticket_1156
- Children:
- 78f8308
- Parents:
- 2c12061
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/bcc_paracrystal.py
r2d81cfe r6530963 123 123 # pylint: disable=bad-whitespace, line-too-long 124 124 # ["name", "units", default, [lower, upper], "type","description" ], 125 parameters = [[" dnn", "Ang", 220, [-inf, inf], "", "Nearest neighbour distance"],126 [" d_factor", "", 0.06, [-inf, inf], "", "Paracrystal distortion factor"],125 parameters = [["lattice_spacing", "Ang", 220, [-inf, inf], "", "Lattice spacing"], 126 ["lattice_distortion", "", 0.06, [-inf, inf], "", "Paracrystal distortion factor"], 127 127 ["radius", "Ang", 40, [0, inf], "volume", "Particle radius"], 128 128 ["sld", "1e-6/Ang^2", 4, [-inf, inf], "sld", "Particle scattering length density"], … … 145 145 # in this range 'cuz its easy. 146 146 radius = 10**np.random.uniform(1.3, 4) 147 d_factor= 10**np.random.uniform(-2, -0.7) # sigma_d in 0.01-0.7148 dnn_fraction = np.random.beta(a=10, b=1)149 dnn = radius*4/np.sqrt(3)/dnn_fraction147 lattice_distortion = 10**np.random.uniform(-2, -0.7) # sigma_d in 0.01-0.7 148 lattice_spacing_fraction = np.random.beta(a=10, b=1) 149 lattice_spacing = radius*4/np.sqrt(3)/lattice_spacing_fraction 150 150 pars = dict( 151 151 #sld=1, sld_solvent=0, scale=1, background=1e-32, 152 dnn=dnn,153 d_factor=d_factor,152 lattice_spacing=lattice_spacing, 153 lattice_distortion=lattice_distortion, 154 154 radius=radius, 155 155 )
Note: See TracChangeset
for help on using the changeset viewer.