Changeset 7e923c2 in sasmodels for sasmodels/models/sphere.py
- Timestamp:
- Aug 7, 2018 10:45:52 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:
- 1a7ddc9
- Parents:
- c036ddb (diff), e9b17b18 (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 rc036ddb 69 69 source = ["lib/sas_3j1x_x.c", "lib/sphere_form.c"] 70 70 71 # No volume normalization despite having a volume parameter 72 # This should perhaps be volume normalized? 73 form_volume = """ 71 c_code = """ 72 static double form_volume(double radius) 73 { 74 74 return sphere_volume(radius); 75 """ 75 } 76 76 77 Iq = """ 78 return sphere_form(q, radius, sld, sld_solvent); 79 """ 77 static void Fq(double q, double *F1,double *F2, double sld, double solvent_sld, double radius) 78 { 79 const double fq = sas_3j1x_x(q*radius); 80 const double contrast = (sld - solvent_sld); 81 const double form = 1e-2 * contrast * sphere_volume(radius) * fq; 82 *F1 = form; 83 *F2 = form*form; 84 } 85 """ 86 87 # TODO: figure this out by inspection 88 have_Fq = True 80 89 81 90 def ER(radius):
Note: See TracChangeset
for help on using the changeset viewer.