source: sasmodels/sasmodels/models/fractal.c @ 99658f6

core_shell_microgelsmagnetic_modelticket-1257-vesicle-productticket_1156ticket_1265_superballticket_822_more_unit_tests
Last change on this file since 99658f6 was 71b751d, checked in by Paul Kienzle <pkienzle@…>, 6 years ago

update remaining form factors to use Fq interface

  • Property mode set to 100644
File size: 779 bytes
Line 
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 }
8
9static double
10Iq(double q,
11   double volfraction,
12   double radius,
13   double fractal_dim,
14   double cor_length,
15   double sld_block,
16   double sld_solvent)
17{
18    const double sq = fractal_sq(q, radius, fractal_dim, cor_length);
19
20    //calculate P(q) for the spherical subunits
21    const double fq = form_volume(radius) * (sld_block-sld_solvent)
22                      *sas_3j1x_x(q*radius);
23
24    // scale to units cm-1 sr-1 (assuming data on absolute scale)
25    //    convert I(1/A) to (1/cm)  => 1e8 * I(q)
26    //    convert rho^2 in 10^-6 1/A to 1/A  => 1e-12 * I(q)
27    //    combined: 1e-4 * I(q)
28
29    return 1.e-4 * volfraction * sq * fq * fq;
30}
Note: See TracBrowser for help on using the repository browser.