Changeset 71b751d in sasmodels for sasmodels/models/sphere.py
- Timestamp:
- Aug 14, 2018 10:09:34 AM (6 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 86aa992
- Parents:
- 2f8cbb9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/sphere.py
rc036ddb r71b751d 67 67 ] 68 68 69 source = ["lib/sas_3j1x_x.c", "lib/sphere_form.c"] 69 source = ["lib/sas_3j1x_x.c"] 70 have_Fq = True 70 71 71 72 c_code = """ 72 73 static double form_volume(double radius) 73 74 { 74 return sphere_volume(radius);75 return M_4PI_3*cube(radius); 75 76 } 76 77 77 static void Fq(double q, double * F1,double *F2, double sld, double solvent_sld, double radius)78 static void Fq(double q, double *f1, double *f2, double sld, double sld_solvent, double radius) 78 79 { 79 const double fq= sas_3j1x_x(q*radius);80 const double contrast = (sld - s olvent_sld);81 const double form = 1e-2 * contrast * sphere_volume(radius) * fq;82 * F1 =form;83 * F2 =form*form;80 const double bes = sas_3j1x_x(q*radius); 81 const double contrast = (sld - sld_solvent); 82 const double form = contrast * form_volume(radius) * bes; 83 *f1 = 1.0e-2*form; 84 *f2 = 1.0e-4*form*form; 84 85 } 85 86 """ 86 87 # TODO: figure this out by inspection88 have_Fq = True89 87 90 88 def ER(radius):
Note: See TracChangeset
for help on using the changeset viewer.