Changeset 2d81cfe in sasmodels for sasmodels/models/core_shell_parallelepiped.py
- Timestamp:
- Nov 29, 2017 11:13:23 AM (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:
- 237b800f
- Parents:
- a839b22
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/core_shell_parallelepiped.py
r8c7d5d5 r2d81cfe 5 5 Calculates the form factor for a rectangular solid with a core-shell structure. 6 6 The thickness and the scattering length density of the shell or 7 "rim" can be different on each (pair) of faces. However at this time 8 the 1D calculation does **NOT** actually calculate a c face rim despite the presence of 9 the parameter. Some other aspects of the 1D calculation may be wrong.7 "rim" can be different on each (pair) of faces. However at this time the 1D 8 calculation does **NOT** actually calculate a c face rim despite the presence 9 of the parameter. Some other aspects of the 1D calculation may be wrong. 10 10 11 11 .. note:: … … 51 51 52 52 F_{a}(Q,\alpha,\beta)= 53 \left[\frac{\sin(\tfrac{1}{2}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] 53 \left[\frac{\sin(\tfrac{1}{2}Q(L_A+2t_A)\sin\alpha \sin\beta) 54 }{\tfrac{1}{2}Q(L_A+2t_A)\sin\alpha\sin\beta} 55 - \frac{\sin(\tfrac{1}{2}QL_A\sin\alpha \sin\beta) 56 }{\tfrac{1}{2}QL_A\sin\alpha \sin\beta} \right] 57 \left[\frac{\sin(\tfrac{1}{2}QL_B\sin\alpha \sin\beta) 58 }{\tfrac{1}{2}QL_B\sin\alpha \sin\beta} \right] 59 \left[\frac{\sin(\tfrac{1}{2}QL_C\sin\alpha \sin\beta) 60 }{\tfrac{1}{2}QL_C\sin\alpha \sin\beta} \right] 57 61 58 62 .. note:: … … 94 98 95 99 Definition of the angles for oriented core-shell parallelepipeds. 96 Note that rotation $\theta$, initially in the $xz$ plane, is carried out first, then 97 rotation $\phi$ about the $z$ axis, finally rotation $\Psi$ is now around the axis of the cylinder. 98 The neutron or X-ray beam is along the $z$ axis. 100 Note that rotation $\theta$, initially in the $xz$ plane, is carried 101 out first, then rotation $\phi$ about the $z$ axis, finally rotation 102 $\Psi$ is now around the axis of the cylinder. The neutron or X-ray 103 beam is along the $z$ axis. 99 104 100 105 .. figure:: img/parallelepiped_angle_projection.png … … 182 187 183 188 def random(): 184 import numpy as np185 189 outer = 10**np.random.uniform(1, 4.7, size=3) 186 190 thick = np.random.beta(0.5, 0.5, size=3)*(outer-2) + 1 … … 216 220 qx, qy = 0.2 * cos(pi/6.), 0.2 * sin(pi/6.) 217 221 tests = [[{}, 0.2, 0.533149288477], 218 [{}, [0.2], [0.533149288477]],219 [{'theta':10.0, 'phi':20.0}, (qx, qy), 0.0853299803222],220 [{'theta':10.0, 'phi':20.0}, [(qx, qy)], [0.0853299803222]],222 [{}, [0.2], [0.533149288477]], 223 [{'theta':10.0, 'phi':20.0}, (qx, qy), 0.0853299803222], 224 [{'theta':10.0, 'phi':20.0}, [(qx, qy)], [0.0853299803222]], 221 225 ] 222 226 del qx, qy # not necessary to delete, but cleaner
Note: See TracChangeset
for help on using the changeset viewer.