Changeset 304c775 in sasmodels for sasmodels/models
- Timestamp:
- Oct 25, 2018 5:35:06 PM (6 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 39a06c9
- Parents:
- 6d5601c
- Location:
- sasmodels/models
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/_spherepy.py
rca4444f r304c775 71 71 return 1.333333333333333 * pi * radius ** 3 72 72 73 def effective_radius(mode, radius): 74 return radius 75 73 76 def Iq(q, sld, sld_solvent, radius): 74 77 #print "q",q … … 105 108 sesans.vectorized = True # sesans accepts an array of z values 106 109 107 def ER(radius):108 return radius109 110 # VR defaults to 1.0111 112 110 demo = dict(scale=1, background=0, 113 111 sld=6, sld_solvent=1, -
sasmodels/models/core_shell_bicelle_elliptical.py
ree60aa7 r304c775 184 184 185 185 tests = [ 186 [{'radius': 30.0, 'x_core': 3.0,187 'thick_rim': 8.0, 'thick_face': 14.0, 'length': 50.0}, 'ER', 1],188 [{'radius': 30.0, 'x_core': 3.0,189 'thick_rim': 8.0, 'thick_face': 14.0, 'length': 50.0}, 'VR', 1],186 #[{'radius': 30.0, 'x_core': 3.0, 187 # 'thick_rim': 8.0, 'thick_face': 14.0, 'length': 50.0}, 'ER', 1], 188 #[{'radius': 30.0, 'x_core': 3.0, 189 # 'thick_rim': 8.0, 'thick_face': 14.0, 'length': 50.0}, 'VR', 1], 190 190 191 191 [{'radius': 30.0, 'x_core': 3.0, -
sasmodels/models/core_shell_bicelle_elliptical_belt_rough.py
ree60aa7 r304c775 186 186 187 187 tests = [ 188 [{'radius': 30.0, 'x_core': 3.0, 'thick_rim':8.0, 'thick_face':14.0, 'length':50.0}, 'ER', 1],189 [{'radius': 30.0, 'x_core': 3.0, 'thick_rim':8.0, 'thick_face':14.0, 'length':50.0}, 'VR', 1],188 #[{'radius': 30.0, 'x_core': 3.0, 'thick_rim':8.0, 'thick_face':14.0, 'length':50.0}, 'ER', 1], 189 #[{'radius': 30.0, 'x_core': 3.0, 'thick_rim':8.0, 'thick_face':14.0, 'length':50.0}, 'VR', 1], 190 190 191 191 [{'radius': 30.0, 'x_core': 3.0, 'thick_rim':8.0, 'thick_face':14.0, 'length':50.0, -
sasmodels/models/core_shell_sphere.py
ree60aa7 r304c775 96 96 97 97 tests = [ 98 # [{'radius': 20.0, 'thickness': 10.0}, 'ER', 30.0],98 [{'radius': 20.0, 'thickness': 10.0}, 0.1, None, None, 30.0, 4.*pi/3*30**3, 1.0], 99 99 100 100 # The SasView test result was 0.00169, with a background of 0.001 -
sasmodels/models/cylinder.py
ree60aa7 r304c775 167 167 phi_pd=10, phi_pd_n=5) 168 168 169 # pylint: disable=bad-whitespace, line-too-long 169 170 qx, qy = 0.2 * np.cos(2.5), 0.2 * np.sin(2.5) 170 171 # After redefinition of angles, find new tests values. Was 10 10 in old coords … … 180 181 ] 181 182 del qx, qy # not necessary to delete, but cleaner 183 184 # Default radius and length 185 radius, length = parameters[2][2], parameters[3][2] 186 tests.extend([ 187 ({'radius_effective_type': 0}, 0.1, None, None, 0., pi*radius**2*length, 1.0), 188 ({'radius_effective_type': 1}, 0.1, None, None, (0.75*radius**2*length)**(1./3.), None, None), 189 ({'radius_effective_type': 2}, 0.1, None, None, radius, None, None), 190 ({'radius_effective_type': 3}, 0.1, None, None, length/2., None, None), 191 ({'radius_effective_type': 4}, 0.1, None, None, min(radius, length/2.), None, None), 192 ({'radius_effective_type': 5}, 0.1, None, None, max(radius, length/2.), None, None), 193 ({'radius_effective_type': 6}, 0.1, None, None, np.sqrt(4*radius**2 + length**2)/2., None, None), 194 ]) 195 del radius, length 196 # pylint: enable=bad-whitespace, line-too-long 197 182 198 # ADDED by: RKH ON: 18Mar2016 renamed sld's etc -
sasmodels/models/dab.py
r2d81cfe r304c775 74 74 return pars 75 75 76 # ER defaults to 1.077 78 # VR defaults to 1.079 80 76 demo = dict(scale=1, background=0, cor_length=50) -
sasmodels/models/gaussian_peak.py
r2d81cfe r304c775 50 50 """ 51 51 52 # VR defaults to 1.053 54 52 def random(): 55 53 peak_pos = 10**np.random.uniform(-3, -1) -
sasmodels/models/hardsphere.py
r71b751d r304c775 162 162 return pars 163 163 164 # ER defaults to 0.0165 # VR defaults to 1.0166 167 164 demo = dict(radius_effective=200, volfraction=0.2, 168 165 radius_effective_pd=0.1, radius_effective_pd_n=40) -
sasmodels/models/hayter_msa.py
r2d81cfe r304c775 89 89 return 1.0; 90 90 """ 91 # ER defaults to 0.092 # VR defaults to 1.093 91 94 92 def random(): -
sasmodels/models/hollow_cylinder.py
ree60aa7 r304c775 69 69 * **Last Reviewed by:** Paul Butler **Date:** September 06, 2018 70 70 """ 71 from __future__ import division 71 72 72 73 import numpy as np … … 132 133 qx = q*cos(pi/6.0) 133 134 qy = q*sin(pi/6.0) 135 radius = parameters[0][2] 136 thickness = parameters[1][2] 137 length = parameters[2][2] 134 138 # Parameters for unit tests 135 139 tests = [ 136 140 [{}, 0.00005, 1764.926], 137 # [{}, 'VR', 0.55555556], 141 [{}, 0.1, None, None, 142 (3./4*(radius+thickness)**2*length)**(1./3), # R_eff from volume 143 pi*((radius+thickness)**2-radius**2)*length, # shell volume 144 (radius+thickness)**2/((radius+thickness)**2 - radius**2), # form:shell ratio 145 ], 138 146 [{}, 0.001, 1756.76], 139 147 [{}, (qx, qy), 2.36885476192], -
sasmodels/models/lamellar.py
r2d81cfe r304c775 95 95 return pars 96 96 97 # ER defaults to 0.098 # VR defaults to 1.099 100 97 demo = dict(scale=1, background=0, 101 98 sld=6, sld_solvent=1, -
sasmodels/models/lamellar_hg.py
r2d81cfe r304c775 109 109 return pars 110 110 111 # ER defaults to 0.0112 # VR defaults to 1.0113 114 111 demo = dict(scale=1, background=0, 115 112 length_tail=15, length_head=10, -
sasmodels/models/lamellar_hg_stack_caille.py
r2d81cfe r304c775 122 122 """ 123 123 124 # ER defaults to 0.0125 # VR defaults to 1.0126 127 124 def random(): 128 125 total_thickness = 10**np.random.uniform(2, 4.7) -
sasmodels/models/lamellar_stack_caille.py
r2d81cfe r304c775 120 120 """ 121 121 122 # ER defaults to 0.0123 # VR defaults to 1.0124 125 122 demo = dict(scale=1, background=0, 126 123 thickness=67., Nlayers=3.75, d_spacing=200., -
sasmodels/models/lamellar_stack_paracrystal.py
r2d81cfe r304c775 147 147 return pars 148 148 149 # ER defaults to 0.0150 # VR defaults to 1.0151 152 149 demo = dict(scale=1, background=0, 153 150 thickness=33, Nlayers=20, d_spacing=250, sigma_d=0.2, -
sasmodels/models/sphere.py
ree60aa7 r304c775 83 83 "radius": 120., "radius_pd": 0.2, "radius_pd_n":45}, 84 84 0.2, 0.228843], 85 # [{"radius": 120., "radius_pd": 0.2, "radius_pd_n":45}, "ER", 120.],86 # [{"radius": 120., "radius_pd": 0.2, "radius_pd_n":45}, "VR", 1.],85 [{"radius": 120., "radius_pd": 0.2, "radius_pd_n":45}, 86 0.1, None, None, 120., None, 1.0], 87 87 ] -
sasmodels/models/squarewell.py
r2d81cfe r304c775 130 130 """ 131 131 132 # ER defaults to 0.0133 # VR defaults to 1.0134 135 132 def random(): 136 133 pars = dict( -
sasmodels/models/stickyhardsphere.py
r2d81cfe r304c775 182 182 """ 183 183 184 # ER defaults to 0.0185 # VR defaults to 1.0186 187 184 demo = dict(radius_effective=200, volfraction=0.2, perturb=0.05, 188 185 stickiness=0.2, radius_effective_pd=0.1, radius_effective_pd_n=40) -
sasmodels/models/vesicle.py
ree60aa7 r304c775 128 128 [{}, 0.100600200401, 1.77063682331], 129 129 [{}, 0.5, 0.00355351388906], 130 # [{}, 'ER', 130.], 131 # [{}, 'VR', 0.54483386436], 130 [{}, 0.1, None, None, 130., None, 1./0.54483386436], # R_eff, form:shell 132 131 ]
Note: See TracChangeset
for help on using the changeset viewer.