Changeset e664a11 in sasmodels


Ignore:
Timestamp:
Mar 22, 2016 12:20:45 PM (9 years ago)
Author:
richardh
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:
6b4f7f6
Parents:
693570c
Message:

stacked_disks fails compare, even before rkh edited it, will investigate

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/stacked_disks.py

    r43b7eea re664a11  
    6565 
    6666where *n* = the total number of the disc stacked (n_stacking), 
    67 *D* = the next neighbor center-to-center distance (d-spacing), 
     67*D* = 2*(*d*+*h*)the next neighbor center-to-center distance (d-spacing), 
    6868and $\sigma_D$ = the Gaussian standard deviation of the d-spacing (sigma_d). 
    6969 
    7070.. note:: 
    71     The 2nd virial coefficient of the cylinder is calculated based on the 
     71    Each assmebly in the stack is layer/core/layer, so the spacing of the cores 
     72    is core plus two layers. The 2nd virial coefficient of the cylinder is  
     73    calculated based on the  
    7274    *radius* and *length* = *n_stacking* * (*core_thick* + 2 * *layer_thick*) 
    7375    values, and used as the effective radius for $S(Q)$ when $P(Q) * S(Q)$ 
     
    8991by the NIST Center for Neutron Research (Kline, 2006) 
    9092 
    91 Reference 
    92 --------- 
     93References 
     94---------- 
    9395 
    9496A Guinier and G Fournet, *Small-Angle Scattering of X-Rays*, John Wiley and Sons, New York, 1955 
     
    109111    core_thick = thickness of the core 
    110112    layer_thick = thickness of a layer 
    111     core_sld = the SLD of the core 
    112     layer_sld = the SLD of the layers 
     113    sld_core = the SLD of the core 
     114    sld_layer = the SLD of the layers 
    113115    n_stacking = the number of the disks 
    114116    sigma_d =  Gaussian STD of d-spacing 
    115     solvent_sld = the SLD of the solvent 
     117    sld_solvent = the SLD of the solvent 
    116118    """ 
    117119category = "shape:cylinder" 
     
    121123parameters = [ 
    122124    ["core_thick",  "Ang",        10.0, [0, inf],    "volume",      "Thickness of the core disk"], 
    123     ["layer_thick", "Ang",        10.0, [0, inf],    "volume",      "Thickness of the stacked disk"], 
     125    ["layer_thick", "Ang",        10.0, [0, inf],    "volume",      "Thickness of layer each side of core"], 
    124126    ["radius",      "Ang",        15.0, [0, inf],    "volume",      "Radius of the stacked disk"], 
    125     ["n_stacking",  "",            1.0, [0, inf],    "volume",      "Number of stacking"], 
     127    ["n_stacking",  "",            1.0, [0, inf],    "volume",      "Number of stacked layer/core/layer disks"], 
    126128    ["sigma_d",     "Ang",         0,   [0, inf],    "",            "GSD of disks sigma_d"], 
    127     ["core_sld",    "1e-6/Ang^2",  4,   [-inf, inf], "",            "Core scattering length density"], 
    128     ["layer_sld",   "1e-6/Ang^2",  0.0, [-inf, inf], "",            "Layer scattering length density"], 
    129     ["solvent_sld", "1e-6/Ang^2",  5.0, [-inf, inf], "",            "Solvent scattering length density"], 
     129    ["sld_core",    "1e-6/Ang^2",  4,   [-inf, inf], "",            "Core scattering length density"], 
     130    ["sld_layer",   "1e-6/Ang^2",  0.0, [-inf, inf], "",            "Layer scattering length density"], 
     131    ["sld_solvent", "1e-6/Ang^2",  5.0, [-inf, inf], "",            "Solvent scattering length density"], 
    130132    ["theta",       "degrees",     0,   [-inf, inf], "orientation", "Orientation of the stacked disk axis w/respect incoming beam"], 
    131133    ["phi",         "degrees",     0,   [-inf, inf], "orientation", "Orientation of the stacked disk in the plane of the detector"], 
     
    142144            n_stacking=1, 
    143145            sigma_d=0, 
    144             core_sld=4, 
    145             layer_sld=0.0, 
    146             solvent_sld=5.0, 
     146            sld_core=4, 
     147            sld_layer=0.0, 
     148            sld_solvent=5.0, 
    147149            theta=0, 
    148150            phi=0) 
     
    151153oldname = 'StackedDisksModel' 
    152154 
    153 oldpars = dict(theta='axis_theta', 
     155oldpars = dict(sld_core='core_sld',sld_layer='layer_sld',sld_solvent='solvent_sld',n_stacking='n_stacking',theta='axis_theta', 
    154156               phi='axis_phi') 
    155157 
     
    161163      'n_stacking': 1.0, 
    162164      'sigma_d': 0.0, 
    163       'core_sld': 4.0, 
    164       'layer_sld': -0.4, 
     165      'sld_core': 4.0, 
     166      'sld_layer': -0.4, 
    165167      'solvent_sd': 5.0, 
    166168      'theta': 0.0, 
     
    175177      'n_stacking': 1.0, 
    176178      'sigma_d': 0.0, 
    177       'core_sld': 4.0, 
    178       'layer_sld': -0.4, 
     179      'sld_core': 4.0, 
     180      'sld_layer': -0.4, 
    179181      'solvent_sd': 5.0, 
    180182      'theta': 0.0, 
     
    189191      'n_stacking': 1.0, 
    190192      'sigma_d': 0.0, 
    191       'core_sld': 4.0, 
    192       'layer_sld': -0.4, 
     193      'sld_core': 4.0, 
     194      'sld_layer': -0.4, 
    193195      'solvent_sd': 5.0, 
    194196      'theta': 0.0, 
     
    203205      'n_stacking': 1.0, 
    204206      'sigma_d': 0.0, 
    205       'core_sld': 4.0, 
    206       'layer_sld': -0.4, 
     207      'sld_core': 4.0, 
     208      'sld_layer': -0.4, 
    207209      'solvent_sd': 5.0, 
    208210      'theta': 0.0, 
     
    212214     }, ([1.3, 1.57]), [0.0010039, 0.0010038]], 
    213215    ] 
    214  
    215  
     216# 21Mar2016   RKH notes that unit tests all have n_stacking=1, ought to test other values 
     217 
Note: See TracChangeset for help on using the changeset viewer.