Changeset 9bc4882 in sasmodels for sasmodels/models/sc_paracrystal.py
- Timestamp:
- Sep 5, 2017 9:01:03 AM (7 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 8db25bf
- Parents:
- acc6c8f (diff), 142a8e2 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/sc_paracrystal.py
r2a0b2b1 r9bc4882 138 138 source = ["lib/sas_3j1x_x.c", "lib/sphere_form.c", "lib/gauss150.c", "sc_paracrystal.c"] 139 139 140 demo = dict(scale=1, background=0, 141 dnn=220.0, 142 d_factor=0.06, 143 radius=40.0, 144 sld=3.0, 145 sld_solvent=6.3, 146 theta=0.0, 147 phi=0.0, 148 psi=0.0) 140 def random(): 141 import numpy as np 142 # copied from bcc_paracrystal 143 radius = 10**np.random.uniform(1.3, 4) 144 d_factor = 10**np.random.uniform(-2, -0.7) # sigma_d in 0.01-0.7 145 dnn_fraction = np.random.beta(a=10, b=1) 146 dnn = radius*4/np.sqrt(4)/dnn_fraction 147 pars = dict( 148 #sld=1, sld_solvent=0, scale=1, background=1e-32, 149 dnn=dnn, 150 d_factor=d_factor, 151 radius=radius, 152 ) 153 return pars 149 154 150 155 tests = [ … … 153 158 [{}, 0.215268, 0.00814889], 154 159 [{}, 0.414467, 0.001313289], 155 [{'theta': 10.0,'phi':20,'psi':30.0},(0.045,-0.035),18.0397138402],156 [{'theta': 10.0,'phi':20,'psi':30.0},(0.023,0.045),0.0177333171285 ]160 [{'theta': 10.0, 'phi': 20, 'psi': 30.0}, (0.045, -0.035), 18.0397138402], 161 [{'theta': 10.0, 'phi': 20, 'psi': 30.0}, (0.023, 0.045), 0.0177333171285], 157 162 ]
Note: See TracChangeset
for help on using the changeset viewer.