Changeset 0706431 in sasmodels
- Timestamp:
- Feb 17, 2015 5:34:10 PM (10 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:
- c95dc908
- Parents:
- 1e11735
- Location:
- sasmodels/models
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/barbell.c
r58f41fe r0706431 21 21 const double be = (arg2 == 0.0 ? 0.5 :J1(arg2)/arg2); 22 22 23 double Fq = cos(arg1)*(1.0-t*t)*be;23 const double Fq = cos(arg1)*(1.0-t*t)*be; 24 24 25 25 total += Gauss76Wt[i] * Fq; … … 36 36 // bell radius should never be less than radius when this is called 37 37 const double hdist = sqrt(bell_radius*bell_radius - radius*radius); 38 const double p1 = 2 *bell_radius*bell_radius*bell_radius/3.0;38 const double p1 = 2.0*bell_radius*bell_radius*bell_radius/3.0; 39 39 const double p2 = bell_radius*bell_radius*hdist; 40 40 const double p3 = hdist*hdist*hdist/3.0; 41 41 42 return M_PI*radius*radius*length + 2.0*M_PI*(p1+p2 +p3);42 return M_PI*radius*radius*length + 2.0*M_PI*(p1+p2-p3); 43 43 } 44 44 … … 55 55 const double lower = 0.0; 56 56 const double upper = M_PI_2; 57 const double h = sqrt( fabs(bell_radius*bell_radius-radius*radius));57 const double h = sqrt(bell_radius*bell_radius-radius*radius); 58 58 double total = 0.0; 59 59 for (int i = 0; i < 76; i++){ … … 78 78 //Contrast and volume normalization 79 79 const double s = (sld - solvent_sld); 80 return form*1.0e-4*s*s; 80 return form*1.0e-4*s*s; //form_volume(bell_radius,radius,length); 81 81 } 82 82 … … 102 102 // # right, so we are leaving it out for now. 103 103 const double q = sqrt(qx*qx+qy*qy); 104 const double cos_val = cn*cos(phi*M_PI_180)* (qx/q) + sn*(qy/q);104 const double cos_val = cn*cos(phi*M_PI_180)*qx + sn*qy; 105 105 const double alpha = acos(cos_val); // rod angle relative to q 106 106 SINCOS(alpha, sn, cn); 107 107 108 108 const double h = sqrt(bell_radius*bell_radius - radius*radius); // negative h 109 const double bell_Fq = _bell_kernel(q, h, bell_radius, length, sn, cn) ;109 const double bell_Fq = _bell_kernel(q, h, bell_radius, length, sn, cn)/sn; 110 110 111 111 const double besarg = q*radius*sn; -
sasmodels/models/barbell.py
r1e11735 r0706431 145 145 bell_radius = 40, radius=20, length=400, 146 146 theta=60, phi=60, 147 radius_pd=.2, radius_pd_n= 0,148 length_pd=.2,length_pd_n= 0,147 radius_pd=.2, radius_pd_n=5, 148 length_pd=.2,length_pd_n=5, 149 149 theta_pd=15, theta_pd_n=0, 150 150 phi_pd=15, phi_pd_n=0,
Note: See TracChangeset
for help on using the changeset viewer.