Changeset 7d4b2ae in sasmodels


Ignore:
Timestamp:
Mar 8, 2016 8:59:23 AM (7 years ago)
Author:
piotr
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
Message:

Added fractal_core_shell

Location:
sasmodels
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/convert.py

    r44bd2be r7d4b2ae  
    1515    'be_polyelectrolyte', 
    1616    'correlation_length', 
    17     'binary_hard_sphere' 
     17    'binary_hard_sphere', 
     18    'fractal_core_shell' 
    1819] 
    1920 
  • sasmodels/models/core_shell_sphere.c

    redc9f8d r7d4b2ae  
    55 
    66double Iq(double q, double radius, double thickness, double core_sld, double shell_sld, double solvent_sld) { 
    7     // Core first, then add in shell 
    8     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; 
    137 
    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; 
    2116} 
    2217 
  • sasmodels/models/core_shell_sphere.py

    rfa8011eb r7d4b2ae  
    7373# pylint: enable=bad-whitespace, line-too-long 
    7474 
    75 source = ["lib/sph_j1c.c", "core_shell_sphere.c"] 
     75source = ["lib/sph_j1c.c", "lib/core_shell.c", "core_shell_sphere.c"] 
    7676 
    7777demo = dict(scale=1, background=0, radius=60, thickness=10, 
Note: See TracChangeset for help on using the changeset viewer.