Changeset 11ca2ab in sasmodels for sasmodels/models/cylinder.c
- Timestamp:
- Oct 14, 2016 1:13:55 AM (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:
- 5abbad7
- Parents:
- a80e64c
- git-author:
- Paul Kienzle <pkienzle@…> (10/13/16 23:39:19)
- git-committer:
- Paul Kienzle <pkienzle@…> (10/14/16 01:13:55)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/cylinder.c
r0d6e865 r11ca2ab 33 33 // alpha(theta,phi) the projection of the cylinder on the detector plane 34 34 SINCOS(alpha, sn, cn); 35 total += Gauss76Wt[i] * fq(q, sn, cn, radius, length)* fq(q, sn, cn, radius, length) * sn;35 total += Gauss76Wt[i] * square(fq(q, sn, cn, radius, length)) * sn; 36 36 } 37 37 // translate dx in [-1,1] to dx in [lower,upper] … … 58 58 double phi) 59 59 { 60 double sn, cn; // slots to hold sincos function output 61 62 // Compute angle alpha between q and the cylinder axis 63 SINCOS(phi*M_PI_180, sn, cn); 64 const double q = sqrt(qx*qx + qy*qy); 65 const double cos_val = (q==0. ? 1.0 : (cn*qx + sn*qy)*sin(theta*M_PI_180)/q); 66 67 const double alpha = acos(cos_val); 68 69 SINCOS(alpha, sn, cn); 60 double q, sin_alpha, cos_alpha; 61 ORIENT_SYMMETRIC(qx, qy, theta, phi, q, sin_alpha, cos_alpha); 70 62 const double s = (sld-solvent_sld) * form_volume(radius, length); 71 return 1.0e-4 * square(s * fq(q, s n, cn, radius, length));63 return 1.0e-4 * square(s * fq(q, sin_alpha, cos_alpha, radius, length)); 72 64 }
Note: See TracChangeset
for help on using the changeset viewer.