source: sasmodels/sasmodels/models/fuzzy_sphere.c @ a34b811

ticket-1257-vesicle-productticket_1156ticket_822_more_unit_tests
Last change on this file since a34b811 was a34b811, checked in by Paul Kienzle <pkienzle@…>, 3 months ago

use radius_effective/radius_effective_mode/radius_effective_modes consistently throughout the code

  • Property mode set to 100644
File size: 763 bytes
Line 
1static double form_volume(double radius, double fuzziness)
2{
3    return M_4PI_3*cube(radius);
4}
5
6static double
7radius_effective(int mode, double radius, double fuzziness)
8{
9    switch (mode) {
10    default:
11    case 1: // radius
12        return radius;
13    case 2: // radius + fuzziness
14        return radius + fuzziness;
15    }
16}
17
18static void Fq(double q, double *F1, double *F2, double sld, double sld_solvent,
19               double radius, double fuzziness)
20{
21    const double qr = q*radius;
22    const double bes = sas_3j1x_x(qr);
23    const double qf = exp(-0.5*square(q*fuzziness));
24    const double contrast = (sld - sld_solvent);
25    const double form = contrast * form_volume(radius,fuzziness) * bes * qf;
26    *F1 = 1.0e-2*form;
27    *F2 = 1.0e-4*form*form;
28}
Note: See TracBrowser for help on using the repository browser.