Changeset 86aa992 in sasmodels for sasmodels/models/sphere.py
- Timestamp:
- Aug 14, 2018 12:09:49 PM (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:
- 6d90684
- Parents:
- 71b751d (diff), d089a00 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/sphere.py
ref07e95 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 # No volume normalization despite having a volume parameter 72 # This should perhaps be volume normalized? 73 form_volume = """ 74 return sphere_volume(radius);75 """ 72 c_code = """ 73 static double form_volume(double radius) 74 { 75 return M_4PI_3*cube(radius); 76 } 76 77 77 Iq = """ 78 return sphere_form(q, radius, sld, sld_solvent); 79 """ 78 static void Fq(double q, double *f1, double *f2, double sld, double sld_solvent, double radius) 79 { 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; 85 } 86 """ 80 87 81 88 def ER(radius):
Note: See TracChangeset
for help on using the changeset viewer.