Changes in / [4050e6a:9f12fbe] in sasmodels


Ignore:
Location:
sasmodels/models
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/fractal.c

    r4788822 r925ad6e  
    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  } 
    82 
    93static double 
     
    1913 
    2014    //calculate P(q) for the spherical subunits 
    21     const double pq = square(form_volume(radius) * (sld_block-sld_solvent) 
    22                       *sas_3j1x_x(q*radius)); 
     15    const double V = M_4PI_3*cube(radius); 
     16    const double pq = V * square((sld_block-sld_solvent)*sas_3j1x_x(q*radius)); 
    2317 
    2418    // scale to units cm-1 sr-1 (assuming data on absolute scale) 
  • sasmodels/models/fractal.py

    rdf89d77 r925ad6e  
    2020.. math:: 
    2121 
    22     P(q)&= F(qR_0)^2 \\ 
    23     F(q)&= \frac{3 (\sin x - x \cos x)}{x^3} \\ 
    24     V_\text{particle} &= \frac{4}{3}\ \pi R_0 \\ 
     22    P(q)&= F(qR_0)^2 
     23 
     24    F(q)&= \frac{3 (\sin x - x \cos x)}{x^3} 
     25 
     26    V_\text{particle} &= \frac{4}{3}\ \pi R_0 
     27 
    2528    S(q) &= 1 + \frac{D_f\  \Gamma\!(D_f-1)}{[1+1/(q \xi)^2\  ]^{(D_f -1)/2}} 
    2629    \frac{\sin[(D_f-1) \tan^{-1}(q \xi) ]}{(q R_0)^{D_f}} 
     
    2932is the fractal dimension, representing the self similarity of the structure.  
    3033Note that S(q) here goes negative if $D_f$ is too large, and the Gamma function  
    31 diverges at $D_f=0$ and $D_f=1$. 
     34diverges at $D_f$=0 and $D_f$=1.   
    3235 
    3336**Polydispersity on the radius is provided for.** 
     
    4447---------- 
    4548 
    46 .. [#] J Teixeira, *J. Appl. Cryst.*, 21 (1988) 781-785 
     49J Teixeira, *J. Appl. Cryst.*, 21 (1988) 781-785 
    4750 
    48 Authorship and Verification 
    49 ---------------------------- 
     51**Author:** NIST IGOR/DANSE **on:** pre 2010 
    5052 
    51 * **Author:** NIST IGOR/DANSE **Date:** pre 2010 
    52 * **Converted to sasmodels by:** Paul Butler **Date:** March 19, 2016 
    53 * **Last Modified by:** Paul Butler **Date:** March 12, 2017 
    54 * **Last Reviewed by:** Paul Butler **Date:** March 12, 2017 
     53**Last Modified by:** Paul Butler **on:** March 20, 2016 
     54 
     55**Last Reviewed by:** Paul Butler **on:** March 20, 2016 
    5556 
    5657""" 
     
    8384parameters = [["volfraction", "", 0.05, [0.0, 1], "", 
    8485               "volume fraction of blocks"], 
    85               ["radius",    "Ang",  5.0, [0.0, inf], "volume", 
     86              ["radius",    "Ang",  5.0, [0.0, inf], "", 
    8687               "radius of particles"], 
    8788              ["fractal_dim",      "",  2.0, [0.0, 6.0], "", 
Note: See TracChangeset for help on using the changeset viewer.