Changes in / [4050e6a:9f12fbe] in sasmodels
- Location:
- sasmodels/models
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/fractal.c
r4788822 r925ad6e 1 1 #define INVALID(p) (p.fractal_dim < 0.0) 2 3 static double4 form_volume(double radius)5 {6 return M_4PI_3 * cube(radius);7 }8 2 9 3 static double … … 19 13 20 14 //calculate P(q) for the spherical subunits 21 const double pq = square(form_volume(radius) * (sld_block-sld_solvent)22 15 const double V = M_4PI_3*cube(radius); 16 const double pq = V * square((sld_block-sld_solvent)*sas_3j1x_x(q*radius)); 23 17 24 18 // scale to units cm-1 sr-1 (assuming data on absolute scale) -
sasmodels/models/fractal.py
rdf89d77 r925ad6e 20 20 .. math:: 21 21 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 25 28 S(q) &= 1 + \frac{D_f\ \Gamma\!(D_f-1)}{[1+1/(q \xi)^2\ ]^{(D_f -1)/2}} 26 29 \frac{\sin[(D_f-1) \tan^{-1}(q \xi) ]}{(q R_0)^{D_f}} … … 29 32 is the fractal dimension, representing the self similarity of the structure. 30 33 Note 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$.34 diverges at $D_f$=0 and $D_f$=1. 32 35 33 36 **Polydispersity on the radius is provided for.** … … 44 47 ---------- 45 48 46 .. [#]J Teixeira, *J. Appl. Cryst.*, 21 (1988) 781-78549 J Teixeira, *J. Appl. Cryst.*, 21 (1988) 781-785 47 50 48 Authorship and Verification 49 ---------------------------- 51 **Author:** NIST IGOR/DANSE **on:** pre 2010 50 52 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 55 56 56 57 """ … … 83 84 parameters = [["volfraction", "", 0.05, [0.0, 1], "", 84 85 "volume fraction of blocks"], 85 ["radius", "Ang", 5.0, [0.0, inf], " volume",86 ["radius", "Ang", 5.0, [0.0, inf], "", 86 87 "radius of particles"], 87 88 ["fractal_dim", "", 2.0, [0.0, 6.0], "",
Note: See TracChangeset
for help on using the changeset viewer.