Changeset 40a87fa in sasmodels for sasmodels/models/core_shell_sphere.py
- Timestamp:
- Aug 8, 2016 9:24:11 AM (8 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 2472141
- Parents:
- 2d65d51
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/core_shell_sphere.py
r42356c8 r40a87fa 2 2 .. _core_shell_sphere: 3 3 4 This model provides the form factor, $P(q)$, for a spherical particle with a core-shell structure.5 The form factor is normalized by the particle volume.4 This model provides the form factor, $P(q)$, for a spherical particle with 5 a core-shell structure. The form factor is normalized by the particle volume. 6 6 7 7 Definition … … 18 18 .. math:: 19 19 20 F^2(q)=\frac{3}{V_s}\left[V_c(\rho_c-\rho_s)\frac{\sin(qr_c)-qr_c\cos(qr_c)}{(qr_c)^3}+ 21 V_s(\rho_s-\rho_{solv})\frac{\sin(qr_s)-qr_s\cos(qr_s)}{(qr_s)^3}\right] 20 F^2(q) = \frac{3}{V_s}\left[ 21 V_c(\rho_c-\rho_s)\frac{\sin(qr_c)-qr_c\cos(qr_c)}{(qr_c)^3} + 22 V_s(\rho_s-\rho_\text{solv})\frac{\sin(qr_s)-qr_s\cos(qr_s)}{(qr_s)^3} 23 \right] 22 24 23 where $V_s$ is the volume of the whole particle, $V_c$ is 24 the volume of the core, $r_s$ = $radius$ + $thickness$ is the radius of the particle, $r_c$ is the radius of the 25 core, $\rho_c$ is the scattering length density of the core, $\rho_s$ is the scattering length 26 density of the shell, $\rho_{solv}$ is the scattering length density of the solvent. 25 where $V_s$ is the volume of the whole particle, $V_c$ is the volume of the 26 core, $r_s$ = $radius$ + $thickness$ is the radius of the particle, $r_c$ 27 is the radius of the core, $\rho_c$ is the scattering length density of the 28 core, $\rho_s$ is the scattering length density of the shell, 29 $\rho_\text{solv}$, is the scattering length density of the solvent. 27 30 28 31 The 2D scattering intensity is the same as $P(q)$ above, regardless of the … … 35 38 ---------- 36 39 37 A Guinier and G Fournet, *Small-Angle Scattering of X-Rays*, John Wiley and Sons, New York, (1955) 40 A Guinier and G Fournet, *Small-Angle Scattering of X-Rays*, 41 John Wiley and Sons, New York, (1955) 38 42 39 43 Validation 40 44 ---------- 41 45 42 Validation of our code was done by comparing the output of the 1D model to the output of 43 the software provided by NIST (Kline, 2006). Figure 1 shows a comparison of the output of 44 our model and the output of the NIST software. 45 46 Validation of our code was done by comparing the output of the 1D model to 47 the output of the software provided by NIST (Kline, 2006). Figure 1 shows a 48 comparison of the output of our model and the output of the NIST software. 46 49 """ 47 50 … … 88 91 @param thickness: shell thickness 89 92 """ 90 return (1, 1)93 return (1, 1) 91 94 whole = 4.0 * pi / 3.0 * pow((radius + thickness), 3) 92 95 core = 4.0 * pi / 3.0 * radius * radius * radius 93 96 return whole, whole - core 94 97 95 tests = [[{'radius': 20.0, 'thickness': 10.0}, 'ER', 30.0], 96 # TODO: VR test suppressed until we sort out new product model 97 # and determine what to do with volume ratio. 98 #[{'radius': 20.0, 'thickness': 10.0}, 'VR', 0.703703704], 98 tests = [ 99 [{'radius': 20.0, 'thickness': 10.0}, 'ER', 30.0], 100 # TODO: VR test suppressed until we sort out new product model 101 # and determine what to do with volume ratio. 102 #[{'radius': 20.0, 'thickness': 10.0}, 'VR', 0.703703704], 99 103 100 # The SasView test result was 0.00169, with a background of 0.001 101 [{'radius': 60.0, 102 'thickness': 10.0, 103 'sld_core': 1.0, 104 'sld_shell':2.0, 105 'sld_solvent':3.0, 106 'background':0.0 107 }, 0.4, 0.000698838]] 104 # The SasView test result was 0.00169, with a background of 0.001 105 [{'radius': 60.0, 'thickness': 10.0, 'sld_core': 1.0, 'sld_shell':2.0, 106 'sld_solvent':3.0, 'background':0.0}, 107 0.4, 0.000698838], 108 ]
Note: See TracChangeset
for help on using the changeset viewer.