Changeset 14207bb in sasmodels
 Timestamp:
 Apr 7, 2017 4:57:41 AM (8 months ago)
 Branches:
 master, boltzmann, costrafo411, doc_update, generic_integration_loop, ticket1043, ticket786
 Children:
 1916c52
 Parents:
 15a90c1
 Location:
 sasmodels/models
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

sasmodels/models/core_shell_parallelepiped.py
r15a90c1 r14207bb 51 51 52 52 F_{a}(Q,\alpha,\beta)= 53 \left[\frac{\ sin(Q(L_A+2t_A)/2\sin\alpha \sin\beta)}{Q(L_A+2t_A)/2\sin\alpha\sin\beta}54  \frac{\sin( QL_A/2\sin\alpha \sin\beta)}{QL_A/2\sin\alpha \sin\beta} \right]55 \left[\frac{\sin( QL_B/2\sin\alpha \sin\beta)}{QL_B/2\sin\alpha \sin\beta} \right]56 \left[\frac{\sin( QL_C/2\sin\alpha \sin\beta)}{QL_C/2\sin\alpha \sin\beta} \right]53 \left[\frac{\tfrac{1}{2}\sin(Q(L_A+2t_A)\sin\alpha \sin\beta)}{\tfrac{1}{2}Q(L_A+2t_A)\sin\alpha\sin\beta} 54  \frac{\sin(\tfrac{1}{2}QL_A\sin\alpha \sin\beta)}{\tfrac{1}{2}QL_A\sin\alpha \sin\beta} \right] 55 \left[\frac{\sin(\tfrac{1}{2}QL_B\sin\alpha \sin\beta)}{\tfrac{1}{2}QL_B\sin\alpha \sin\beta} \right] 56 \left[\frac{\sin(\tfrac{1}{2}QL_C\sin\alpha \sin\beta)}{\tfrac{1}{2}QL_C\sin\alpha \sin\beta} \right] 57 57 58 58 .. note:: … … 120 120 121 121 import numpy as np 122 from numpy import pi, inf, sqrt 122 from numpy import pi, inf, sqrt, cos, sin 123 123 124 124 name = "core_shell_parallelepiped" … … 194 194 psi_pd=10, psi_pd_n=1) 195 195 196 qx, qy = 0.2 * np.cos(2.5), 0.2 * np.sin(2.5) 196 # rkh 7/4/17 add random unit test for 2d, note make all params different, 2d values not tested against other codes or models 197 qx, qy = 0.2 * cos(pi/6.), 0.2 * sin(pi/6.) 197 198 tests = [[{}, 0.2, 0.533149288477], 198 199 [{}, [0.2], [0.533149288477]], 199 [{'theta':10.0, 'phi': 10.0}, (qx, qy), 0.032102135569],200 [{'theta':10.0, 'phi': 10.0}, [(qx, qy)], [0.032102135569]],200 [{'theta':10.0, 'phi':20.0}, (qx, qy), 0.0853299803222], 201 [{'theta':10.0, 'phi':20.0}, [(qx, qy)], [0.0853299803222]], 201 202 ] 202 203 del qx, qy # not necessary to delete, but cleaner 
sasmodels/models/parallelepiped.py
r15a90c1 r14207bb 174 174 175 175 import numpy as np 176 from numpy import pi, inf, sqrt 176 from numpy import pi, inf, sqrt, sin, cos 177 177 178 178 name = "parallelepiped" … … 243 243 phi_pd=10, phi_pd_n=1, 244 244 psi_pd=10, psi_pd_n=10) 245 246 qx, qy = 0.2 * np.cos(2.5), 0.2 * np.sin(2.5)245 # rkh 7/4/17 add random unit test for 2d, note make all params different, 2d values not tested against other codes or models 246 qx, qy = 0.2 * cos(pi/6.), 0.2 * sin(pi/6.) 247 247 tests = [[{}, 0.2, 0.17758004974], 248 248 [{}, [0.2], [0.17758004974]], 249 [{'theta':10.0, 'phi': 10.0}, (qx, qy), 0.00560296014],250 [{'theta':10.0, 'phi': 10.0}, [(qx, qy)], [0.00560296014]],249 [{'theta':10.0, 'phi':20.0}, (qx, qy), 0.0089517140475], 250 [{'theta':10.0, 'phi':20.0}, [(qx, qy)], [0.0089517140475]], 251 251 ] 252 252 del qx, qy # not necessary to delete, but cleaner
Note: See TracChangeset
for help on using the changeset viewer.