Changeset 4788822 in sasmodels


Ignore:
Timestamp:
Mar 19, 2017 11:21:34 PM (7 years ago)
Author:
butler
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
df89d77
Parents:
9f12fbe
Message:

added polydispersity back to fractal (as it used to be, as the
documentation implies and as core_shell_fractal already has). Also
formatted documentation according to current standard for references and
authorship/verification. Fixes #877

Location:
sasmodels/models
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/fractal.c

    r925ad6e r4788822  
    11#define INVALID(p) (p.fractal_dim < 0.0) 
     2 
     3 static double 
     4 form_volume(double radius) 
     5 { 
     6     return M_4PI_3 * cube(radius); 
     7 } 
    28 
    39static double 
     
    1319 
    1420    //calculate P(q) for the spherical subunits 
    15     const double V = M_4PI_3*cube(radius); 
    16     const double pq = V * square((sld_block-sld_solvent)*sas_3j1x_x(q*radius)); 
     21    const double pq = square(form_volume(radius) * (sld_block-sld_solvent) 
     22                      *sas_3j1x_x(q*radius)); 
    1723 
    1824    // scale to units cm-1 sr-1 (assuming data on absolute scale) 
  • sasmodels/models/fractal.py

    r925ad6e r4788822  
    4747---------- 
    4848 
    49 J Teixeira, *J. Appl. Cryst.*, 21 (1988) 781-785 
     49.. [#] J Teixeira, *J. Appl. Cryst.*, 21 (1988) 781-785 
    5050 
    51 **Author:** NIST IGOR/DANSE **on:** pre 2010 
     51Authorship and Verification 
     52---------------------------- 
    5253 
    53 **Last Modified by:** Paul Butler **on:** March 20, 2016 
    54  
    55 **Last Reviewed by:** Paul Butler **on:** March 20, 2016 
     54* **Author:** NIST IGOR/DANSE **Date:** pre 2010 
     55* **Converted to sasmodels by:** Paul Butler **Date:** March 19, 2016 
     56* **Last Modified by:** Paul Butler **Date:** March 12, 2017 
     57* **Last Reviewed by:** Paul Butler **Date:** March 12, 2017 
    5658 
    5759""" 
     
    8486parameters = [["volfraction", "", 0.05, [0.0, 1], "", 
    8587               "volume fraction of blocks"], 
    86               ["radius",    "Ang",  5.0, [0.0, inf], "", 
     88              ["radius",    "Ang",  5.0, [0.0, inf], "volume", 
    8789               "radius of particles"], 
    8890              ["fractal_dim",      "",  2.0, [0.0, 6.0], "", 
Note: See TracChangeset for help on using the changeset viewer.