Changeset 7d4b2ae in sasmodels
- Timestamp:
- Mar 8, 2016 8:59:23 AM (9 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:
- 5a483877
- Parents:
- ad90df9
- Location:
- sasmodels
- Files:
-
- 4 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/convert.py
r44bd2be r7d4b2ae 15 15 'be_polyelectrolyte', 16 16 'correlation_length', 17 'binary_hard_sphere' 17 'binary_hard_sphere', 18 'fractal_core_shell' 18 19 ] 19 20 -
sasmodels/models/core_shell_sphere.c
redc9f8d r7d4b2ae 5 5 6 6 double Iq(double q, double radius, double thickness, double core_sld, double shell_sld, double solvent_sld) { 7 // Core first, then add in shell8 const double core_qr = q * radius;9 const double core_contrast = core_sld - shell_sld;10 const double core_bes = sph_j1c(core_qr);11 const double core_volume = 4.0 * M_PI / 3.0 * radius * radius * radius;12 double f = core_volume * core_bes * core_contrast;13 7 14 // Now the shell 15 const double shell_qr = q * (radius + thickness); 16 const double shell_contrast = shell_sld - solvent_sld; 17 const double shell_bes = sph_j1c(shell_qr); 18 const double shell_volume = 4.0 * M_PI / 3.0 * pow((radius + thickness), 3); 19 f += shell_volume * shell_bes * shell_contrast; 20 return f * f * 1.0e-4; 8 9 double intensity = core_shell_kernel(q, 10 radius, 11 thickness, 12 core_sld, 13 shell_sld, 14 solvent_sld); 15 return intensity; 21 16 } 22 17 -
sasmodels/models/core_shell_sphere.py
rfa8011eb r7d4b2ae 73 73 # pylint: enable=bad-whitespace, line-too-long 74 74 75 source = ["lib/sph_j1c.c", " core_shell_sphere.c"]75 source = ["lib/sph_j1c.c", "lib/core_shell.c", "core_shell_sphere.c"] 76 76 77 77 demo = dict(scale=1, background=0, radius=60, thickness=10,
Note: See TracChangeset
for help on using the changeset viewer.