source: sasmodels/sasmodels/models/fractal.c @ 925ad6e

core_shell_microgelscostrafo411magnetic_modelticket-1257-vesicle-productticket_1156ticket_1265_superballticket_822_more_unit_tests
Last change on this file since 925ad6e was 925ad6e, checked in by wojciech, 7 years ago

sph_j1c translated to sas_3j1x_x

  • Property mode set to 100644
File size: 699 bytes
Line 
1#define INVALID(p) (p.fractal_dim < 0.0)
2
3static double
4Iq(double q,
5   double volfraction,
6   double radius,
7   double fractal_dim,
8   double cor_length,
9   double sld_block,
10   double sld_solvent)
11{
12    const double sq = fractal_sq(q, radius, fractal_dim, cor_length);
13
14    //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));
17
18    // scale to units cm-1 sr-1 (assuming data on absolute scale)
19    //    convert I(1/A) to (1/cm)  => 1e8 * I(q)
20    //    convert rho^2 in 10^-6 1/A to 1/A  => 1e-12 * I(q)
21    //    combined: 1e-4 * I(q)
22
23    return 1.e-4 * volfraction * sq * pq;
24}
25
Note: See TracBrowser for help on using the repository browser.