Changeset 9762341 in sasmodels


Ignore:
Timestamp:
Oct 17, 2016 1:27:27 PM (8 years ago)
Author:
Paul Kienzle <pkienzle@…>
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
Message:

onion: update variables to match parameter names

Location:
sasmodels/models
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/onion.c

    rd119f34 r9762341  
    3030 
    3131static double 
    32 form_volume(double core_radius, double n, double thickness[]) 
     32form_volume(double radius_core, double n, double thickness[]) 
    3333{ 
    3434  int i; 
    35   double r = core_radius; 
     35  double r = radius_core; 
    3636  for (i=0; i < n; i++) { 
    3737    r += thickness[i]; 
     
    4141 
    4242static double 
    43 Iq(double q, double sld_core, double core_radius, double sld_solvent, 
     43Iq(double q, double sld_core, double radius_core, double sld_solvent, 
    4444    double n_shells, double sld_in[], double sld_out[], double thickness[], 
    4545    double A[]) 
    4646{ 
    4747  int n = (int)(n_shells+0.5); 
    48   double r_out = core_radius; 
     48  double r_out = radius_core; 
    4949  double f = f_exp(q, r_out, sld_core, 0.0, 0.0, 0.0, 0.0); 
    5050  for (int i=0; i < n; i++){ 
  • sasmodels/models/onion.py

    r7b68dc5 r9762341  
    366366    return np.asarray(z), np.asarray(rho) 
    367367 
    368 def ER(core_radius, n, thickness): 
     368def ER(radius_core, n, thickness): 
    369369    """Effective radius""" 
    370     return np.sum(thickness[:int(n[0])], axis=0) + core_radius 
     370    return np.sum(thickness[:int(n[0])], axis=0) + radius_core 
    371371 
    372372demo = { 
    373373    "sld_solvent": 2.2, 
    374374    "sld_core": 1.0, 
    375     "core_radius": 100, 
     375    "radius_core": 100, 
    376376    "n_shells": 4, 
    377377    "sld_in": [0.5, 1.5, 0.9, 2.0], 
     
    381381    # Could also specify them individually as 
    382382    # "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, 
    385385    #"thickness4_pd_n": 10, 
    386386    #"thickness4_pd": 0.4, 
Note: See TracChangeset for help on using the changeset viewer.