source: sasmodels/sasmodels/models/sphere.c @ 7e923c2

core_shell_microgelsmagnetic_modelticket-1257-vesicle-productticket_1156ticket_1265_superballticket_822_more_unit_tests
Last change on this file since 7e923c2 was c036ddb, checked in by Paul Kienzle <pkienzle@…>, 6 years ago

refactor so Iq is not needed if Fq is defined

  • Property mode set to 100644
File size: 560 bytes
Line 
1static double form_volume(double radius)
2{
3    return sphere_volume(radius);
4}
5
6// TODO: remove Iq when Iqxy can use Fq directly
7static double Iq(double q, double sld, double sld_solvent, double radius)
8{
9    return sphere_form(q, radius, sld, sld_solvent);
10}
11
12static void Fq(double q, double *F1,double *F2, double sld, double solvent_sld, double radius)
13{
14    const double fq = sas_3j1x_x(q*radius);
15    const double contrast = (sld - solvent_sld);
16    const double form = 1e-2 * contrast * sphere_volume(radius) * fq;
17    *F1 = form;
18    *F2 = form*form;
19}
Note: See TracBrowser for help on using the repository browser.