Changeset 7c57861 in sasmodels


Ignore:
Timestamp:
Oct 1, 2016 10:36:48 AM (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:
30fbe2e
Parents:
b99734a
Message:

normalize nearest neighbor spaccing dnn, vs bragg spacing d_spacing and
polydispersity in spacing sigma_d

Location:
sasmodels/models
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/lamellar_hg_stack_caille.py

    ra807206 r7c57861  
    100100    ["Nlayers", "", 30, [0, inf], "", 
    101101     "Number of layers"], 
    102     ["spacing", "Ang", 40., [0.0, inf], "volume", 
    103      "d-spacing of Caille S(Q)"], 
     102    ["d_spacing", "Ang", 40., [0.0, inf], "volume", 
     103     "lamellar d-spacing of Caille S(Q)"], 
    104104    ["Caille_parameter", "", 0.001, [0.0, 0.8], "", 
    105105     "Caille parameter"], 
     
    125125demo = dict( 
    126126    scale=1, background=0, 
    127     Nlayers=20, spacing=200., Caille_parameter=0.05, 
     127    Nlayers=20, d_spacing=200., Caille_parameter=0.05, 
    128128    length_tail=15, length_head=10, 
    129129    #sld=-1, sld_head=4.0, sld_solvent=6.0, 
     
    131131    length_tail_pd=0.1, length_tail_pd_n=20, 
    132132    length_head_pd=0.05, length_head_pd_n=30, 
    133     spacing_pd=0.2, spacing_pd_n=40, 
     133    d_spacing_pd=0.2, d_spacing_pd_n=40, 
    134134    ) 
    135135 
    136136# 
    137137tests = [[{'scale': 1.0, 'background': 0.0, 'length_tail': 10.0, 'length_head': 2.0, 
    138            'Nlayers': 30.0, 'spacing': 40., 'Caille_parameter': 0.001, 'sld': 0.4, 
     138           'Nlayers': 30.0, 'd_spacing': 40., 'Caille_parameter': 0.001, 'sld': 0.4, 
    139139           'sld_head': 2.0, 'sld_solvent': 6.0, 'length_tail_pd': 0.0, 
    140            'length_head_pd': 0.0, 'spacing_pd': 0.0}, [0.001], [6838238.571488]]] 
     140           'length_head_pd': 0.0, 'd_spacing_pd': 0.0}, [0.001], [6838238.571488]]] 
    141141# ADDED by: RKH  ON: 18Mar2016  converted from sasview previously, now renaming everything & sorting the docs 
  • sasmodels/models/lamellar_stack_caille.py

    r0bef47b r7c57861  
    4040    \end{align*} 
    4141 
    42 Here $d$ = (repeat) spacing, $\delta$ = bilayer thickness, 
     42Here $d$ = (repeat) d_spacing, $\delta$ = bilayer thickness, 
    4343the contrast $\Delta\rho$ = SLD(headgroup) - SLD(solvent), 
    4444$K$ = smectic bending elasticity, $B$ = compression modulus, and 
     
    8989    ["thickness",        "Ang",      30.0,  [0, inf],   "volume", "sheet thickness"], 
    9090    ["Nlayers",          "",          20,   [0, inf],   "",       "Number of layers"], 
    91     ["spacing",          "Ang",      400.,  [0.0,inf],  "volume", "d-spacing of Caille S(Q)"], 
     91    ["d_spacing",        "Ang",      400.,  [0.0,inf],  "volume", "lamellar d-spacing of Caille S(Q)"], 
    9292    ["Caille_parameter", "1/Ang^2",    0.1, [0.0,0.8],  "",       "Caille parameter"], 
    9393    ["sld",              "1e-6/Ang^2", 6.3, [-inf,inf], "sld",    "layer scattering length density"], 
     
    108108 
    109109demo = dict(scale=1, background=0, 
    110             thickness=67., Nlayers=3.75, spacing=200., 
     110            thickness=67., Nlayers=3.75, d_spacing=200., 
    111111            Caille_parameter=0.268, sld=1.0, sld_solvent=6.34, 
    112112            thickness_pd=0.1, thickness_pd_n=100, 
    113             spacing_pd=0.05, spacing_pd_n=40) 
     113            d_spacing_pd=0.05, d_spacing_pd_n=40) 
    114114 
    115115# 
    116116tests = [ 
    117117    [{'scale': 1.0, 'background': 0.0, 'thickness': 30., 'Nlayers': 20.0, 
    118       'spacing': 400., 'Caille_parameter': 0.1, 'sld': 6.3, 
    119       'sld_solvent': 1.0, 'thickness_pd': 0.0, 'spacing_pd': 0.0}, 
     118      'd_spacing': 400., 'Caille_parameter': 0.1, 'sld': 6.3, 
     119      'sld_solvent': 1.0, 'thickness_pd': 0.0, 'd_spacing_pd': 0.0}, 
    120120     [0.001], [28895.13397]] 
    121121    ] 
  • sasmodels/models/lamellar_stack_paracrystal.py

    r0bef47b r7c57861  
    2222- *Nlayers* is the number of layers $N$, 
    2323 
    24 - *spacing* is the average distance between adjacent layers 
     24- *d_spacing* is the average distance between adjacent layers 
    2525  $\langle D \rangle$, and 
    2626 
    27 - *spacing_polydisp* is the relative standard deviation of the Gaussian 
     27- *sigma_d* is the relative standard deviation of the Gaussian 
    2828  layer distance distribution $\sigma_D / \langle D \rangle$. 
    2929 
     
    115115              ["Nlayers", "", 20, [0, inf], "", 
    116116               "Number of layers"], 
    117               ["spacing", "Ang", 250., [0.0, inf], "", 
    118                "d-spacing of paracrystal stack"], 
    119               ["spacing_polydisp", "Ang", 0.0, [0.0, inf], "", 
    120                "d-spacing polydispersity"], 
     117              ["d_spacing", "Ang", 250., [0.0, inf], "", 
     118               "lamellar spacing of paracrystal stack"], 
     119              ["sigma_d", "Ang", 0.0, [0.0, inf], "", 
     120               "Sigma (polydispersity) of the lamellar spacing"], 
    121121              ["sld", "1e-6/Ang^2", 1.0, [-inf, inf], "sld", 
    122122               "layer scattering length density"], 
     
    136136 
    137137demo = dict(scale=1, background=0, 
    138             thickness=33, Nlayers=20, spacing=250, spacing_polydisp=0.2, 
     138            thickness=33, Nlayers=20, d_spacing=250, sigma_d=0.2, 
    139139            sld=1.0, sld_solvent=6.34, 
    140140            thickness_pd=0.2, thickness_pd_n=40) 
     
    143143tests = [ 
    144144    [{'scale': 1.0, 'background': 0.0, 'thickness': 33.,'Nlayers': 20.0, 
    145       'spacing': 250., 'spacing_polydisp': 0.2, 'sld': 1.0, 
     145      'd_spacing': 250., 'sigma_d': 0.2, 'sld': 1.0, 
    146146      'sld_solvent': 6.34, 'thickness_pd': 0.0, 'thickness_pd_n': 40 }, 
    147147     [0.001, 0.215268], [21829.3, 0.00487686]], 
  • sasmodels/models/stacked_disks.py

    ra807206 r7c57861  
    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_Dnn/2\right] 
     62    \exp\left[ -k(q\cos{\alpha})^2\sigma_d/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_Dnn$ = the Gaussian standard deviation of the d-spacing (*sigma_dnn*). 
     66and $\sigma_d$ = the Gaussian standard deviation of the d-spacing (*sigma_d*). 
    6767 
    6868.. note:: 
     
    119119    sld_layer = the SLD of the layers 
    120120    n_stacking = the number of the disks 
    121     sigma_dnn =  Gaussian STD of d-spacing 
     121    sigma_d =  Gaussian STD of d-spacing 
    122122    sld_solvent = the SLD of the solvent 
    123123    """ 
     
    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_dnn",   "Ang",         0,   [0, inf],    "",            "Sigma of nearest neighbor spacing"], 
     133    ["sigma_d",     "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"], 
     
    148148            radius=15.0, 
    149149            n_stacking=1, 
    150             sigma_dnn=0, 
     150            sigma_d=0, 
    151151            sld_core=4, 
    152152            sld_layer=0.0, 
     
    162162      'radius': 3000.0, 
    163163      'n_stacking': 1.0, 
    164       'sigma_dnn': 0.0, 
     164      'sigma_d': 0.0, 
    165165      'sld_core': 4.0, 
    166166      'sld_layer': -0.4, 
     
    176176      'radius': 3000.0, 
    177177      'n_stacking': 5.0, 
    178       'sigma_dnn': 0.0, 
     178      'sigma_d': 0.0, 
    179179      'sld_core': 4.0, 
    180180      'sld_layer': -0.4, 
     
    190190      'radius': 3000.0, 
    191191      'n_stacking': 5.0, 
    192       'sigma_dnn': 0.0, 
     192      'sigma_d': 0.0, 
    193193      'sld_core': 4.0, 
    194194      'sld_layer': -0.4, 
     
    204204      'radius': 3000.0, 
    205205      'n_stacking': 1.0, 
    206       'sigma_dnn': 0.0, 
     206      'sigma_d': 0.0, 
    207207      'sld_core': 4.0, 
    208208      'sld_layer': -0.4, 
     
    218218      'radius': 3000.0, 
    219219      'n_stacking': 1.0, 
    220       'sigma_dnn': 0.0, 
     220      'sigma_d': 0.0, 
    221221      'sld_core': 4.0, 
    222222      'sld_layer': -0.4, 
     
    232232      'radius': 3000.0, 
    233233      'n_stacking': 1.0, 
    234       'sigma_dnn': 0.0, 
     234      'sigma_d': 0.0, 
    235235      'sld_core': 4.0, 
    236236      'sld_layer': -0.4, 
Note: See TracChangeset for help on using the changeset viewer.