Changeset 73e08ae in sasmodels
- Timestamp:
- Oct 17, 2016 11:53:08 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:
- 0b040de
- Parents:
- 92ce163
- Location:
- sasmodels/models
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/core_shell_ellipsoid.py
ref5a314 r73e08ae 125 125 # ["name", "units", default, [lower, upper], "type", "description"], 126 126 parameters = [ 127 ["radius_equat_core","Ang", 20, [0, inf], 127 ["radius_equat_core","Ang", 20, [0, inf], "volume", "Equatorial radius of core"], 128 128 ["x_core", "None", 3, [0, inf], "volume", "axial ratio of core, X = r_polar/r_equatorial"], 129 129 ["thick_shell", "Ang", 30, [0, inf], "volume", "thickness of shell at equator"], -
sasmodels/models/cylinder.c
r11ca2ab r73e08ae 18 18 const double qr = q*radius; 19 19 const double qh = q*0.5*length; 20 return sas_J1c(qr*sn) * sinc(qh*cn);20 return sas_J1c(qr*sn) * sinc(qh*cn); 21 21 } 22 22 … … 60 60 double q, sin_alpha, cos_alpha; 61 61 ORIENT_SYMMETRIC(qx, qy, theta, phi, q, sin_alpha, cos_alpha); 62 //printf("sn: %g cn: %g\n", sin_alpha, cos_alpha); 62 63 const double s = (sld-solvent_sld) * form_volume(radius, length); 63 return 1.0e-4 * square(s * fq(q, sin_alpha, cos_alpha, radius, length)); 64 const double form = fq(q, sin_alpha, cos_alpha, radius, length); 65 return 1.0e-4 * square(s * form); 64 66 } -
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.