Changeset 9762341 in sasmodels
- Timestamp:
- Oct 17, 2016 11:27:27 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:
- 2126131
- Parents:
- 8393c74
- Location:
- sasmodels/models
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/onion.c
rd119f34 r9762341 30 30 31 31 static double 32 form_volume(double core_radius, double n, double thickness[])32 form_volume(double radius_core, double n, double thickness[]) 33 33 { 34 34 int i; 35 double r = core_radius;35 double r = radius_core; 36 36 for (i=0; i < n; i++) { 37 37 r += thickness[i]; … … 41 41 42 42 static double 43 Iq(double q, double sld_core, double core_radius, double sld_solvent,43 Iq(double q, double sld_core, double radius_core, double sld_solvent, 44 44 double n_shells, double sld_in[], double sld_out[], double thickness[], 45 45 double A[]) 46 46 { 47 47 int n = (int)(n_shells+0.5); 48 double r_out = core_radius;48 double r_out = radius_core; 49 49 double f = f_exp(q, r_out, sld_core, 0.0, 0.0, 0.0, 0.0); 50 50 for (int i=0; i < n; i++){ -
sasmodels/models/onion.py
r7b68dc5 r9762341 366 366 return np.asarray(z), np.asarray(rho) 367 367 368 def ER( core_radius, n, thickness):368 def ER(radius_core, n, thickness): 369 369 """Effective radius""" 370 return np.sum(thickness[:int(n[0])], axis=0) + core_radius370 return np.sum(thickness[:int(n[0])], axis=0) + radius_core 371 371 372 372 demo = { 373 373 "sld_solvent": 2.2, 374 374 "sld_core": 1.0, 375 " core_radius": 100,375 "radius_core": 100, 376 376 "n_shells": 4, 377 377 "sld_in": [0.5, 1.5, 0.9, 2.0], … … 381 381 # Could also specify them individually as 382 382 # "A1": 0, "A2": -1, "A3": 1e-4, "A4": 1, 383 #" core_radius_pd_n": 10,384 #" core_radius_pd": 0.4,383 #"radius_core_pd_n": 10, 384 #"radius_core_pd": 0.4, 385 385 #"thickness4_pd_n": 10, 386 386 #"thickness4_pd": 0.4,
Note: See TracChangeset
for help on using the changeset viewer.