Changeset 73e08ae in sasmodels for sasmodels/models/ellipsoid.c
- Timestamp:
- Oct 17, 2016 1:53:08 PM (7 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 0b040de
- Parents:
- 92ce163
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/ellipsoid.c
r5bddd89 r73e08ae 8 8 { 9 9 double ratio = radius_polar/radius_equatorial; 10 const double u = q*radius_equatorial*sqrt(1.0 11 + sin_alpha*sin_alpha*(ratio*ratio - 1.0)); 12 const double f = sph_j1c(u); 10 // Given the following under the radical: 11 // 1 + sin^2(T) (v^2 - 1) 12 // we can expand to match the form given in Guinier (1955) 13 // = (1 - sin^2(T)) + v^2 sin^2(T) = cos^2(T) + sin^2(T) 14 // Instead of using pythagoras we could pass in sin and cos; this may be 15 // slightly better for 2D which has already computed it, but it introduces 16 // an extra sqrt and square for 1-D not required by the current form, so 17 // leave it as is. 18 const double r = radius_equatorial 19 * sqrt(1.0 + sin_alpha*sin_alpha*(ratio*ratio - 1.0)); 20 const double f = sph_j1c(q*r); 13 21 14 22 return f*f;
Note: See TracChangeset
for help on using the changeset viewer.