Changes in / [16a8c63:e6ab0d3] in sasmodels
- Location:
- sasmodels/models
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/barbell.py
r0b56f38 rfcb33e4 87 87 * **Last Reviewed by:** Richard Heenan **Date:** January 4, 2017 88 88 """ 89 from numpy import inf , sin, cos, pi89 from numpy import inf 90 90 91 91 name = "barbell" … … 125 125 phi_pd=15, phi_pd_n=0, 126 126 ) 127 q = 0.1128 # 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
re2d6e3b r925ad6e 99 99 """ 100 100 101 from numpy import inf , pi101 from numpy import inf 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 # add 2d test later145 q =4.*pi/220.146 tests = [147 [{ },148 [0.001, q, 0.215268], [1.46601394721, 2.85851284174, 0.00866710287078]],149 ] -
sasmodels/models/capped_cylinder.py
r0b56f38 rfcb33e4 91 91 92 92 """ 93 from numpy import inf , sin, cos, pi93 from numpy import inf 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.1148 # 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
r0b56f38 r8afefae 88 88 """ 89 89 90 from numpy import inf, sin, cos , pi90 from numpy import inf, sin, cos 91 91 92 92 name = "core_shell_bicelle" … … 155 155 theta=90, 156 156 phi=0) 157 q = 0.1158 # 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 cleaner165 157 158 #qx, qy = 0.4 * cos(pi/2.0), 0.5 * sin(0) -
sasmodels/models/core_shell_bicelle_elliptical.py
r15a90c1 r15a90c1 99 99 """ 100 100 101 from numpy import inf, sin, cos , pi101 from numpy import inf, sin, cos 102 102 103 103 name = "core_shell_bicelle_elliptical" … … 150 150 psi=0) 151 151 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) 152 #qx, qy = 0.4 * cos(pi/2.0), 0.5 * sin(0) 156 153 157 154 tests = [ … … 162 159 'sld_core':4.0, 'sld_face':7.0, 'sld_rim':1.0, 'sld_solvent':6.0, 'background':0.0}, 163 160 0.015, 286.540286], 164 # [{'theta':80., 'phi':10.}, (qx, qy), 7.88866563001 ], 165 ] 166 167 del qx, qy # not necessary to delete, but cleaner 161 ] -
sasmodels/models/core_shell_cylinder.py
r0b56f38 r8e68ea0 73 73 """ 74 74 75 from numpy import pi, inf , sin, cos75 from numpy import pi, inf 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 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 153 -
sasmodels/models/ellipsoid.py
r0b56f38 r4b0a294 120 120 """ 121 121 122 from numpy import inf , sin, cos, pi122 from numpy import inf 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.1193 # 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
r15a90c1 r15a90c1 109 109 """ 110 110 111 from numpy import pi, inf, sqrt , sin, cos111 from numpy import pi, inf, sqrt 112 112 113 113 name = "elliptical_cylinder" … … 150 150 + (length + radius) * (length + pi * radius)) 151 151 return 0.5 * (ddd) ** (1. / 3.) 152 q = 0.1153 # 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)156 152 157 153 tests = [ … … 163 159 'sld_solvent':1.0, 'background':0.0}, 164 160 0.001, 675.504402], 165 # [{'theta':80., 'phi':10.}, (qx, qy), 7.88866563001 ],166 161 ] -
sasmodels/models/fcc_paracrystal.py
re2d6e3b r925ad6e 90 90 """ 91 91 92 from numpy import inf , pi92 from numpy import inf 93 93 94 94 name = "fcc_paracrystal" … … 128 128 psi_pd=15, psi_pd_n=0, 129 129 ) 130 # april 6 2017, rkh add unit tests, NOT compared with any other calc method, assume correct!131 # add 2d test later132 q =4.*pi/220.133 tests = [134 [{ },135 [0.001, q, 0.215268], [0.275164706668, 5.7776842567, 0.00958167119232]],136 ] -
sasmodels/models/hollow_cylinder.py
r0b56f38 raea2e2a 60 60 """ 61 61 62 from numpy import pi, inf , sin, cos62 from numpy import pi, inf 63 63 64 64 name = "hollow_cylinder" … … 129 129 theta_pd=10, theta_pd_n=5, 130 130 ) 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) 131 135 132 # Parameters for unit tests 136 133 tests = [ 137 134 [{}, 0.00005, 1764.926], 138 135 [{}, 'VR', 1.8], 139 [{}, 0.001, 1756.76], 140 [{}, (qx, qy), 2.36885476192 ], 141 ] 142 del qx, qy # not necessary to delete, but cleaner 136 [{}, 0.001, 1756.76] 137 ] -
sasmodels/models/stacked_disks.py
r0b56f38 rb7e8b94 103 103 """ 104 104 105 from numpy import inf , sin, cos, pi105 from numpy import inf 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 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) 154 # but should not matter here as so far all the tests are 1D not 2D 158 155 tests = [ 159 156 # Accuracy tests based on content in test/utest_extra_models.py. … … 189 186 [{'thick_core': 10.0, 190 187 '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,204 188 'radius': 3000.0, 205 189 'n_stacking': 5, … … 244 228 'background': 0.001, 245 229 }, ([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 ],259 230 260 231 [{'thick_core': 10.0, -
sasmodels/models/triaxial_ellipsoid.py
r15a90c1 r15a90c1 86 86 The contrast $\Delta\rho$ is defined as SLD(ellipsoid) - SLD(solvent). In the 87 87 parameters, $R_a$ is the minor equatorial radius, $R_b$ is the major 88 equatorial radius, and $R_c$ is the polar radius of the ellipsoid. 88 equatorial radius, and $R_c$ is the polar radius of the ellipsoid. 89 89 90 90 NB: The 2nd virial coefficient of the triaxial solid ellipsoid is … … 117 117 """ 118 118 119 from numpy import inf , sin, cos, pi119 from numpy import inf 120 120 121 121 name = "triaxial_ellipsoid" … … 157 157 from .ellipsoid import ER as ellipsoid_ER 158 158 159 # now that radii can be in any size order, radii need sorting a,b,c where a~b and c is either much smaller 159 # now that radii can be in any size order, radii need sorting a,b,c where a~b and c is either much smaller 160 160 # or much larger 161 161 radii = np.vstack((radius_equat_major, radius_equat_minor, radius_polar)) … … 177 177 psi_pd=15, psi_pd_n=1) 178 178 179 q = 0.1 180 # april 6 2017, rkh add unit tests, NOT compared with any other calc method, assume correct! 181 # add 2d test after pull #890 182 qx = q*cos(pi/6.0) 183 qy = q*sin(pi/6.0) 184 tests = [[{}, 0.05, 24.8839548033], 185 # [{'theta':80., 'phi':10.}, (qx, qy), 9999. ], 186 ] 187 del qx, qy # not necessary to delete, but cleaner 179 # TODO: need some unit tests!
Note: See TracChangeset
for help on using the changeset viewer.