Changeset a807206 in sasmodels for sasmodels/models/stacked_disks.py


Ignore:
Timestamp:
Sep 30, 2016 10:42:06 PM (8 years ago)
Author:
butler
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
caddb14, 5031ca3
Parents:
2222134
Message:

updating more parameter names addressing #649

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/stacked_disks.py

    r40a87fa ra807206  
    5454    \right]^2 \sin{\alpha}\ d\alpha 
    5555 
    56 where $d$ = thickness of the layer (*layer_thick*), 
    57 $2h$ = core thickness (*core_thick*), and $R$ = radius of the disc (*radius*). 
     56where $d$ = thickness of the layer (*thick_layer*), 
     57$2h$ = core thickness (*thick_core*), and $R$ = radius of the disc (*radius*). 
    5858 
    5959.. math:: 
    6060 
    6161    S(q) = 1 + \frac{1}{2}\sum_{k=1}^n(n-k)\cos{(kDq\cos{\alpha})} 
    62     \exp\left[ -k(q\cos{\alpha})^2\sigma_D/2\right] 
     62    \exp\left[ -k(q\cos{\alpha})^2\sigma_Dnn/2\right] 
    6363 
    6464where $n$ is the total number of the disc stacked (*n_stacking*), 
    6565$D = 2(d+h)$ is the next neighbor center-to-center distance (d-spacing), 
    66 and $\sigma_D$ = the Gaussian standard deviation of the d-spacing (*sigma_d*). 
     66and $\sigma_Dnn$ = the Gaussian standard deviation of the d-spacing (*sigma_dnn*). 
    6767 
    6868.. note:: 
    69     Each assmebly in the stack is layer/core/layer, so the spacing of the 
     69    Each assembly in the stack is layer/core/layer, so the spacing of the 
    7070    cores is core plus two layers. The 2nd virial coefficient of the cylinder 
    7171    is calculated based on the *radius* and *length* 
    72     = *n_stacking* * (*core_thick* + 2 * *layer_thick*) 
     72    = *n_stacking* * (*thick_core* + 2 * *thick_layer*) 
    7373    values, and used as the effective radius for $S(Q)$ when $P(Q) * S(Q)$ 
    7474    is applied. 
     
    114114    One layer of disk consists of a core, a top layer, and a bottom layer. 
    115115    radius =  the radius of the disk 
    116     core_thick = thickness of the core 
    117     layer_thick = thickness of a layer 
     116    thick_core = thickness of the core 
     117    thick_layer = thickness of a layer 
    118118    sld_core = the SLD of the core 
    119119    sld_layer = the SLD of the layers 
    120120    n_stacking = the number of the disks 
    121     sigma_d =  Gaussian STD of d-spacing 
     121    sigma_dnn =  Gaussian STD of d-spacing 
    122122    sld_solvent = the SLD of the solvent 
    123123    """ 
     
    127127#   ["name", "units", default, [lower, upper], "type","description"], 
    128128parameters = [ 
    129     ["core_thick",  "Ang",        10.0, [0, inf],    "volume",      "Thickness of the core disk"], 
    130     ["layer_thick", "Ang",        10.0, [0, inf],    "volume",      "Thickness of layer each side of core"], 
     129    ["thick_core",  "Ang",        10.0, [0, inf],    "volume",      "Thickness of the core disk"], 
     130    ["thick_layer", "Ang",        10.0, [0, inf],    "volume",      "Thickness of layer each side of core"], 
    131131    ["radius",      "Ang",        15.0, [0, inf],    "volume",      "Radius of the stacked disk"], 
    132132    ["n_stacking",  "",            1.0, [0, inf],    "volume",      "Number of stacked layer/core/layer disks"], 
    133     ["sigma_d",     "Ang",         0,   [0, inf],    "",            "GSD of disks sigma_d"], 
     133    ["sigma_dnn",   "Ang",         0,   [0, inf],    "",            "Sigma of nearest neighbor spacing"], 
    134134    ["sld_core",    "1e-6/Ang^2",  4,   [-inf, inf], "sld",         "Core scattering length density"], 
    135135    ["sld_layer",   "1e-6/Ang^2",  0.0, [-inf, inf], "sld",         "Layer scattering length density"], 
     
    144144demo = dict(background=0.001, 
    145145            scale=0.01, 
    146             core_thick=10.0, 
    147             layer_thick=10.0, 
     146            thick_core=10.0, 
     147            thick_layer=10.0, 
    148148            radius=15.0, 
    149149            n_stacking=1, 
    150             sigma_d=0, 
     150            sigma_dnn=0, 
    151151            sld_core=4, 
    152152            sld_layer=0.0, 
     
    158158    # Accuracy tests based on content in test/utest_extra_models.py. 
    159159    # Added 2 tests with n_stacked = 5 using SasView 3.1.2 - PDB 
    160     [{'core_thick': 10.0, 
    161       'layer_thick': 15.0, 
    162       'radius': 3000.0, 
    163       'n_stacking': 1.0, 
    164       'sigma_d': 0.0, 
     160    [{'thick_core': 10.0, 
     161      'thick_layer': 15.0, 
     162      'radius': 3000.0, 
     163      'n_stacking': 1.0, 
     164      'sigma_dnn': 0.0, 
    165165      'sld_core': 4.0, 
    166166      'sld_layer': -0.4, 
     
    172172     }, 0.001, 5075.12], 
    173173 
    174     [{'core_thick': 10.0, 
    175       'layer_thick': 15.0, 
     174    [{'thick_core': 10.0, 
     175      'thick_layer': 15.0, 
    176176      'radius': 3000.0, 
    177177      'n_stacking': 5.0, 
    178       'sigma_d': 0.0, 
     178      'sigma_dnn': 0.0, 
    179179      'sld_core': 4.0, 
    180180      'sld_layer': -0.4, 
     
    186186     }, 0.001, 5065.12793824], 
    187187 
    188     [{'core_thick': 10.0, 
    189       'layer_thick': 15.0, 
     188    [{'thick_core': 10.0, 
     189      'thick_layer': 15.0, 
    190190      'radius': 3000.0, 
    191191      'n_stacking': 5.0, 
    192       'sigma_d': 0.0, 
     192      'sigma_dnn': 0.0, 
    193193      'sld_core': 4.0, 
    194194      'sld_layer': -0.4, 
     
    200200     }, 0.164, 0.0127673597265], 
    201201 
    202     [{'core_thick': 10.0, 
    203       'layer_thick': 15.0, 
    204       'radius': 3000.0, 
    205       'n_stacking': 1.0, 
    206       'sigma_d': 0.0, 
     202    [{'thick_core': 10.0, 
     203      'thick_layer': 15.0, 
     204      'radius': 3000.0, 
     205      'n_stacking': 1.0, 
     206      'sigma_dnn': 0.0, 
    207207      'sld_core': 4.0, 
    208208      'sld_layer': -0.4, 
     
    214214     }, [0.001, 90.0], [5075.12, 0.001]], 
    215215 
    216     [{'core_thick': 10.0, 
    217       'layer_thick': 15.0, 
    218       'radius': 3000.0, 
    219       'n_stacking': 1.0, 
    220       'sigma_d': 0.0, 
     216    [{'thick_core': 10.0, 
     217      'thick_layer': 15.0, 
     218      'radius': 3000.0, 
     219      'n_stacking': 1.0, 
     220      'sigma_dnn': 0.0, 
    221221      'sld_core': 4.0, 
    222222      'sld_layer': -0.4, 
     
    228228     }, ([0.4, 0.5]), [0.00105074, 0.00121761]], 
    229229 
    230     [{'core_thick': 10.0, 
    231       'layer_thick': 15.0, 
    232       'radius': 3000.0, 
    233       'n_stacking': 1.0, 
    234       'sigma_d': 0.0, 
     230    [{'thick_core': 10.0, 
     231      'thick_layer': 15.0, 
     232      'radius': 3000.0, 
     233      'n_stacking': 1.0, 
     234      'sigma_dnn': 0.0, 
    235235      'sld_core': 4.0, 
    236236      'sld_layer': -0.4, 
Note: See TracChangeset for help on using the changeset viewer.