Changeset 0d6e865 in sasmodels for sasmodels/models/ellipsoid.c
- Timestamp:
- Oct 11, 2016 1:42:00 PM (8 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:
- 1fdb555
- Parents:
- 19e7ca7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/ellipsoid.c
ra807206 r0d6e865 52 52 53 53 const double q = sqrt(qx*qx + qy*qy); 54 SINCOS(theta*M_PI_180, sn, cn); 55 // TODO: check if this is actually sin(alpha), not cos(alpha) 56 const double cos_alpha = cn*cos(phi*M_PI_180)*(qx/q) + sn*(qy/q); 57 const double form = _ellipsoid_kernel(q, radius_polar, radius_equatorial, cos_alpha); 54 SINCOS(phi*M_PI_180, sn, cn); 55 const double cos_alpha = (q==0. ? 1.0 : (cn*qx + sn*qy)*sin(theta*M_PI_180)/q); 56 const double alpha = acos(cos_alpha); 57 SINCOS(alpha, sn, cn); 58 const double form = _ellipsoid_kernel(q, radius_polar, radius_equatorial, sn); 58 59 const double s = (sld - sld_solvent) * form_volume(radius_polar, radius_equatorial); 59 60
Note: See TracChangeset
for help on using the changeset viewer.