Changeset 768c0c4 in sasmodels
- Timestamp:
- Dec 20, 2016 4:58:11 PM (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:
- fa4a994
- Parents:
- 8c92abb
- Location:
- sasmodels/models
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/onion.c
r9762341 r768c0c4 30 30 31 31 static double 32 form_volume(double radius_core, double n , double thickness[])32 form_volume(double radius_core, double n_shells, double thickness[]) 33 33 { 34 int i;34 int n = (int)(n_shells+0.5); 35 35 double r = radius_core; 36 for (i =0; i < n; i++) {36 for (int i=0; i < n; i++) { 37 37 r += thickness[i]; 38 38 } -
sasmodels/models/onion.py
r9762341 r768c0c4 323 323 Returns shape profile with x=radius, y=SLD. 324 324 """ 325 325 n_shells = int(n_shells+0.5) 326 326 total_radius = 1.25*(sum(thickness[:n_shells]) + radius_core + 1) 327 327 dz = total_radius/400 # 400 points for a smooth plot … … 366 366 return np.asarray(z), np.asarray(rho) 367 367 368 def ER(radius_core, n , thickness):368 def ER(radius_core, n_shells, thickness): 369 369 """Effective radius""" 370 return np.sum(thickness[:int(n[0])], axis=0) + radius_core 370 n = int(n_shells[0]+0.5) 371 return np.sum(thickness[:n], axis=0) + radius_core 371 372 372 373 demo = {
Note: See TracChangeset
for help on using the changeset viewer.