Changes in / [9f12fbe:4050e6a] in sasmodels
- Location:
- sasmodels/models
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/fractal.c
r925ad6e r4788822 1 1 #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 } 2 8 3 9 static double … … 13 19 14 20 //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)); 17 23 18 24 // scale to units cm-1 sr-1 (assuming data on absolute scale) -
sasmodels/models/fractal.py
r925ad6e rdf89d77 20 20 .. math:: 21 21 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 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 \\ 28 25 S(q) &= 1 + \frac{D_f\ \Gamma\!(D_f-1)}{[1+1/(q \xi)^2\ ]^{(D_f -1)/2}} 29 26 \frac{\sin[(D_f-1) \tan^{-1}(q \xi) ]}{(q R_0)^{D_f}} … … 32 29 is the fractal dimension, representing the self similarity of the structure. 33 30 Note that S(q) here goes negative if $D_f$ is too large, and the Gamma function 34 diverges at $D_f $=0 and $D_f$=1.31 diverges at $D_f=0$ and $D_f=1$. 35 32 36 33 **Polydispersity on the radius is provided for.** … … 47 44 ---------- 48 45 49 J Teixeira, *J. Appl. Cryst.*, 21 (1988) 781-78546 .. [#] J Teixeira, *J. Appl. Cryst.*, 21 (1988) 781-785 50 47 51 **Author:** NIST IGOR/DANSE **on:** pre 2010 48 Authorship and Verification 49 ---------------------------- 52 50 53 **Last Modified by:** Paul Butler **on:** March 20, 2016 54 55 **Last Reviewed by:** Paul Butler **on:** March 20, 2016 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 56 55 57 56 """ … … 84 83 parameters = [["volfraction", "", 0.05, [0.0, 1], "", 85 84 "volume fraction of blocks"], 86 ["radius", "Ang", 5.0, [0.0, inf], " ",85 ["radius", "Ang", 5.0, [0.0, inf], "volume", 87 86 "radius of particles"], 88 87 ["fractal_dim", "", 2.0, [0.0, 6.0], "",
Note: See TracChangeset
for help on using the changeset viewer.