Changeset 0b56f38 in sasmodels
- Timestamp:
- Apr 6, 2017 6:01:42 AM (8 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:
- e2d6e3b
- Parents:
- b6e0636
- Location:
- sasmodels/models
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/barbell.py
rfcb33e4 r0b56f38 87 87 * **Last Reviewed by:** Richard Heenan **Date:** January 4, 2017 88 88 """ 89 from numpy import inf 89 from numpy import inf, sin, cos, pi 90 90 91 91 name = "barbell" … … 125 125 phi_pd=15, phi_pd_n=0, 126 126 ) 127 q = 0.1 128 # april 6 2017, rkh add unit tests, NOT compared with any other calc method, assume correct! 129 qx = q*cos(pi/6.0) 130 qy = q*sin(pi/6.0) 131 tests = [[{}, 0.075, 25.5691260532], 132 [{'theta':80., 'phi':10.}, (qx, qy), 3.04233067789], 133 ] 134 del qx, qy # not necessary to delete, but cleaner -
sasmodels/models/bcc_paracrystal.py
r925ad6e r0b56f38 99 99 """ 100 100 101 from numpy import inf 101 from numpy import inf, pi 102 102 103 103 name = "bcc_paracrystal" … … 141 141 psi_pd=15, psi_pd_n=0, 142 142 ) 143 # april 6 2017, rkh add unit tests, NOT compared with any other calc method, assume correct! 144 q =4.*pi/220. 145 tests = [ 146 [{ }, 147 [0.001, q, 0.215268], [1.46601394721, 2.85851284174, 0.00866710287078]], 148 ] -
sasmodels/models/capped_cylinder.py
rfcb33e4 r0b56f38 91 91 92 92 """ 93 from numpy import inf 93 from numpy import inf, sin, cos, pi 94 94 95 95 name = "capped_cylinder" … … 145 145 theta_pd=15, theta_pd_n=45, 146 146 phi_pd=15, phi_pd_n=1) 147 q = 0.1 148 # april 6 2017, rkh add unit tests, NOT compared with any other calc method, assume correct! 149 qx = q*cos(pi/6.0) 150 qy = q*sin(pi/6.0) 151 tests = [[{}, 0.075, 26.0698570695], 152 [{'theta':80., 'phi':10.}, (qx, qy), 0.561811990502], 153 ] 154 del qx, qy # not necessary to delete, but cleaner -
sasmodels/models/core_shell_bicelle.py
r3b9a526 r0b56f38 88 88 """ 89 89 90 from numpy import inf, sin, cos 90 from numpy import inf, sin, cos, pi 91 91 92 92 name = "core_shell_bicelle" … … 155 155 theta=90, 156 156 phi=0) 157 q = 0.1 158 # april 6 2017, rkh add unit tests, NOT compared with any other calc method, assume correct! 159 qx = q*cos(pi/6.0) 160 qy = q*sin(pi/6.0) 161 tests = [[{}, 0.05, 7.4883545957], 162 [{'theta':80., 'phi':10.}, (qx, qy), 2.81048892474 ], 163 ] 164 del qx, qy # not necessary to delete, but cleaner 157 165 158 #qx, qy = 0.4 * cos(pi/2.0), 0.5 * sin(0) -
sasmodels/models/core_shell_bicelle_elliptical.py
r3b9a526 r0b56f38 99 99 """ 100 100 101 from numpy import inf, sin, cos 101 from numpy import inf, sin, cos, pi 102 102 103 103 name = "core_shell_bicelle_elliptical" … … 150 150 psi=0) 151 151 152 #qx, qy = 0.4 * cos(pi/2.0), 0.5 * sin(0) 152 q = 0.1 153 # april 6 2017, rkh added a 2d unit test, NOT READY YET pull #890 branch assume correct! 154 qx = q*cos(pi/6.0) 155 qy = q*sin(pi/6.0) 153 156 154 157 tests = [ … … 159 162 'sld_core':4.0, 'sld_face':7.0, 'sld_rim':1.0, 'sld_solvent':6.0, 'background':0.0}, 160 163 0.015, 286.540286], 161 ] 164 # [{'theta':80., 'phi':10.}, (qx, qy), 7.88866563001 ], 165 ] 166 167 del qx, qy # not necessary to delete, but cleaner -
sasmodels/models/core_shell_cylinder.py
rfcb33e4 r0b56f38 73 73 """ 74 74 75 from numpy import pi, inf 75 from numpy import pi, inf, sin, cos 76 76 77 77 name = "core_shell_cylinder" … … 151 151 theta_pd=15, theta_pd_n=45, 152 152 phi_pd=15, phi_pd_n=1) 153 153 q = 0.1 154 # april 6 2017, rkh add unit tests, NOT compared with any other calc method, assume correct! 155 qx = q*cos(pi/6.0) 156 qy = q*sin(pi/6.0) 157 tests = [[{}, 0.075, 10.8552692237], 158 [{}, (qx, qy), 0.444618752741 ], 159 ] 160 del qx, qy # not necessary to delete, but cleaner -
sasmodels/models/ellipsoid.py
r4b0a294 r0b56f38 120 120 """ 121 121 122 from numpy import inf 122 from numpy import inf, sin, cos, pi 123 123 124 124 name = "ellipsoid" … … 190 190 theta_pd=15, theta_pd_n=45, 191 191 phi_pd=15, phi_pd_n=1) 192 q = 0.1 193 # april 6 2017, rkh add unit tests, NOT compared with any other calc method, assume correct! 194 qx = q*cos(pi/6.0) 195 qy = q*sin(pi/6.0) 196 tests = [[{}, 0.05, 54.8525847025], 197 [{'theta':80., 'phi':10.}, (qx, qy), 1.74134670026 ], 198 ] 199 del qx, qy # not necessary to delete, but cleaner -
sasmodels/models/elliptical_cylinder.py
rfcb33e4 r0b56f38 108 108 """ 109 109 110 from numpy import pi, inf, sqrt 110 from numpy import pi, inf, sqrt, sin, cos 111 111 112 112 name = "elliptical_cylinder" … … 149 149 + (length + radius) * (length + pi * radius)) 150 150 return 0.5 * (ddd) ** (1. / 3.) 151 q = 0.1 152 # april 6 2017, rkh added a 2d unit test, NOT READY YET pull #890 branch assume correct! 153 qx = q*cos(pi/6.0) 154 qy = q*sin(pi/6.0) 151 155 152 156 tests = [ … … 158 162 'sld_solvent':1.0, 'background':0.0}, 159 163 0.001, 675.504402], 164 # [{'theta':80., 'phi':10.}, (qx, qy), 7.88866563001 ], 160 165 ] -
sasmodels/models/hollow_cylinder.py
raea2e2a r0b56f38 60 60 """ 61 61 62 from numpy import pi, inf 62 from numpy import pi, inf, sin, cos 63 63 64 64 name = "hollow_cylinder" … … 129 129 theta_pd=10, theta_pd_n=5, 130 130 ) 131 131 q = 0.1 132 # april 6 2017, rkh added a 2d unit test, assume correct! 133 qx = q*cos(pi/6.0) 134 qy = q*sin(pi/6.0) 132 135 # Parameters for unit tests 133 136 tests = [ 134 137 [{}, 0.00005, 1764.926], 135 138 [{}, 'VR', 1.8], 136 [{}, 0.001, 1756.76] 137 ] 139 [{}, 0.001, 1756.76], 140 [{}, (qx, qy), 2.36885476192 ], 141 ] 142 del qx, qy # not necessary to delete, but cleaner -
sasmodels/models/stacked_disks.py
rc3ccaec r0b56f38 103 103 """ 104 104 105 from numpy import inf 105 from numpy import inf, sin, cos, pi 106 106 107 107 name = "stacked_disks" … … 152 152 # After redefinition of spherical coordinates - 153 153 # tests had in old coords theta=0, phi=0; new coords theta=90, phi=0 154 # but should not matter here as so far all the tests are 1D not 2D 154 q = 0.1 155 # april 6 2017, rkh added a 2d unit test, assume correct! 156 qx = q*cos(pi/6.0) 157 qy = q*sin(pi/6.0) 155 158 tests = [ 156 159 # Accuracy tests based on content in test/utest_extra_models.py. … … 186 189 [{'thick_core': 10.0, 187 190 'thick_layer': 15.0, 191 'radius': 100.0, 192 'n_stacking': 5, 193 'sigma_d': 0.0, 194 'sld_core': 4.0, 195 'sld_layer': -0.4, 196 'solvent_sd': 5.0, 197 'theta': 90.0, 198 'phi': 20.0, 199 'scale': 0.01, 200 'background': 0.001}, 201 (qx, qy), 0.0491167089952 ], 202 [{'thick_core': 10.0, 203 'thick_layer': 15.0, 188 204 'radius': 3000.0, 189 205 'n_stacking': 5, … … 228 244 'background': 0.001, 229 245 }, ([0.4, 0.5]), [0.00105074, 0.00121761]], 246 [{'thick_core': 10.0, 247 'thick_layer': 15.0, 248 'radius': 3000.0, 249 'n_stacking': 1.0, 250 'sigma_d': 0.0, 251 'sld_core': 4.0, 252 'sld_layer': -0.4, 253 'solvent_sd': 5.0, 254 'theta': 90.0, 255 'phi': 20.0, 256 'scale': 0.01, 257 'background': 0.001, 258 }, (qx, qy), 0.0341738733124 ], 230 259 231 260 [{'thick_core': 10.0, -
sasmodels/models/triaxial_ellipsoid.py
r4b0a294 r0b56f38 112 112 """ 113 113 114 from numpy import inf 114 from numpy import inf, sin, cos, pi 115 115 116 116 name = "triaxial_ellipsoid" … … 166 166 phi_pd=15, phi_pd_n=1, 167 167 psi_pd=15, psi_pd_n=1) 168 q = 0.1 169 # april 6 2017, rkh add unit tests, NOT compared with any other calc method, assume correct! 170 # add 2d test after pull #890 171 qx = q*cos(pi/6.0) 172 qy = q*sin(pi/6.0) 173 tests = [[{}, 0.05, 24.8839548033], 174 # [{'theta':80., 'phi':10.}, (qx, qy), 9999. ], 175 ] 176 del qx, qy # not necessary to delete, but cleaner
Note: See TracChangeset
for help on using the changeset viewer.