core_shell_microgelsmagnetic_modelticket-1257-vesicle-productticket_1156ticket_1265_superballticket_822_more_unit_tests
Last change
on this file since 71b751d was
48462b0,
checked in by Paul Kienzle <pkienzle@…>, 7 years ago
|
tuned random model generation for even more models
|
-
Property mode set to
100644
|
File size:
710 bytes
|
Line | |
---|
1 | static 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(-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.