source: sasmodels/sasmodels/models/gel_fit.c @ a807206

core_shell_microgelscostrafo411magnetic_modelrelease_v0.94release_v0.95ticket-1257-vesicle-productticket_1156ticket_1265_superballticket_822_more_unit_tests
Last change on this file since a807206 was a807206, checked in by butler, 8 years ago

updating more parameter names addressing #649

  • Property mode set to 100644
File size: 718 bytes
Line 
1static double Iq(double q,
2          double guinier_scale,
3          double lorentz_scale,
4          double rg,
5          double fractal_dim,
6          double cor_length)
7{
8    // Lorentzian Term
9    ////////////////////////double a(x[i]*x[i]*zeta*zeta);
10    double lorentzian_term = square(q*cor_length);
11    lorentzian_term = 1.0 + ((fractal_dim + 1.0)/3.0)*lorentzian_term;
12    lorentzian_term = pow(lorentzian_term, (fractal_dim/2.0) );
13
14    // Exponential Term
15    ////////////////////////double d(x[i]*x[i]*rg*rg);
16    double exp_term = square(q*rg);
17    exp_term = exp(-1.0*(exp_term/3.0));
18
19    // Scattering Law
20    double result = lorentz_scale/lorentzian_term + guinier_scale*exp_term;
21    return result;
22}
Note: See TracBrowser for help on using the repository browser.