Changeset a807206 in sasmodels for sasmodels/models/gel_fit.c
- Timestamp:
- Sep 30, 2016 10:42:06 PM (8 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- caddb14, 5031ca3
- Parents:
- 2222134
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/gel_fit.c
r03cac08 ra807206 1 1 static double Iq(double q, 2 2 double guinier_scale, 3 double lorentz ian_scale,4 double gyration_radius,5 double fractal_ exp,3 double lorentz_scale, 4 double rg, 5 double fractal_dim, 6 6 double cor_length) 7 7 { … … 9 9 ////////////////////////double a(x[i]*x[i]*zeta*zeta); 10 10 double lorentzian_term = square(q*cor_length); 11 lorentzian_term = 1.0 + ((fractal_ exp+ 1.0)/3.0)*lorentzian_term;12 lorentzian_term = pow(lorentzian_term, (fractal_ exp/2.0) );11 lorentzian_term = 1.0 + ((fractal_dim + 1.0)/3.0)*lorentzian_term; 12 lorentzian_term = pow(lorentzian_term, (fractal_dim/2.0) ); 13 13 14 14 // Exponential Term 15 15 ////////////////////////double d(x[i]*x[i]*rg*rg); 16 double exp_term = square(q* gyration_radius);16 double exp_term = square(q*rg); 17 17 exp_term = exp(-1.0*(exp_term/3.0)); 18 18 19 19 // Scattering Law 20 double result = lorentz ian_scale/lorentzian_term + guinier_scale*exp_term;20 double result = lorentz_scale/lorentzian_term + guinier_scale*exp_term; 21 21 return result; 22 22 }
Note: See TracChangeset
for help on using the changeset viewer.