Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/stacked_disks.py

    r9802ab3 rb7e8b94  
    5858and $\sigma_d$ = the Gaussian standard deviation of the d-spacing (*sigma_d*). 
    5959Note that $D\cos(\alpha)$ is the component of $D$ parallel to $q$ and the last 
    60 term in the equation above is effectively a Debye-Waller factor term. 
     60term in the equation above is effectively a Debye-Waller factor term.  
    6161 
    6262.. note:: 
     
    7777the axis of the cylinder using two angles $\theta$ and $\varphi$. 
    7878 
    79 .. figure:: img/cylinder_angle_definition.png 
     79.. figure:: img/cylinder_angle_definition.jpg 
    8080 
    8181    Examples of the angles against the detector plane. 
     
    103103""" 
    104104 
    105 from numpy import inf, sin, cos, pi 
     105from numpy import inf 
    106106 
    107107name = "stacked_disks" 
     
    126126    ["thick_layer", "Ang",        10.0, [0, inf],    "volume",      "Thickness of layer each side of core"], 
    127127    ["radius",      "Ang",        15.0, [0, inf],    "volume",      "Radius of the stacked disk"], 
    128     ["n_stacking",  "",            1.0, [1, inf],    "volume",      "Number of stacked layer/core/layer disks"], 
     128    ["n_stacking",  "",            1.0, [0, inf],    "volume",      "Number of stacked layer/core/layer disks"], 
    129129    ["sigma_d",     "Ang",         0,   [0, inf],    "",            "Sigma of nearest neighbor spacing"], 
    130130    ["sld_core",    "1e-6/Ang^2",  4,   [-inf, inf], "sld",         "Core scattering length density"], 
    131131    ["sld_layer",   "1e-6/Ang^2",  0.0, [-inf, inf], "sld",         "Layer scattering length density"], 
    132132    ["sld_solvent", "1e-6/Ang^2",  5.0, [-inf, inf], "sld",         "Solvent scattering length density"], 
    133     ["theta",       "degrees",     0,   [-360, 360], "orientation", "Orientation of the stacked disk axis w/respect incoming beam"], 
    134     ["phi",         "degrees",     0,   [-360, 360], "orientation", "Rotation about beam"], 
     133    ["theta",       "degrees",     0,   [-inf, inf], "orientation", "Orientation of the stacked disk axis w/respect incoming beam"], 
     134    ["phi",         "degrees",     0,   [-inf, inf], "orientation", "Orientation of the stacked disk in the plane of the detector"], 
    135135    ] 
    136136# pylint: enable=bad-whitespace, line-too-long 
     
    152152# After redefinition of spherical coordinates - 
    153153# tests had in old coords theta=0, phi=0; new coords theta=90, phi=0 
    154 q = 0.1 
    155 # april 6 2017, rkh added a 2d unit test, assume correct! 
    156 qx = q*cos(pi/6.0) 
    157 qy = q*sin(pi/6.0) 
     154# but should not matter here as so far all the tests are 1D not 2D 
    158155tests = [ 
    159156# Accuracy tests based on content in test/utest_extra_models.py. 
    160 # Added 2 tests with n_stacked = 5 using SasView 3.1.2 - PDB; 
    161 # for which alas q=0.001 values seem closer to n_stacked=1 not 5, 
    162 # changed assuming my 4.1 code OK, RKH 
     157# Added 2 tests with n_stacked = 5 using SasView 3.1.2 - PDB; for which alas q=0.001 values seem closer to n_stacked=1 not 5, changed assuming my 4.1 code OK, RKH 
    163158    [{'thick_core': 10.0, 
    164159      'thick_layer': 15.0, 
     
    191186    [{'thick_core': 10.0, 
    192187      'thick_layer': 15.0, 
    193       'radius': 100.0, 
    194       'n_stacking': 5, 
    195       'sigma_d': 0.0, 
    196       'sld_core': 4.0, 
    197       'sld_layer': -0.4, 
    198       'solvent_sd': 5.0, 
    199       'theta': 90.0, 
    200       'phi': 20.0, 
    201       'scale': 0.01, 
    202       'background': 0.001}, 
    203       (qx, qy), 0.0491167089952  ], 
    204     [{'thick_core': 10.0, 
    205       'thick_layer': 15.0, 
    206188      'radius': 3000.0, 
    207189      'n_stacking': 5, 
     
    246228      'background': 0.001, 
    247229     }, ([0.4, 0.5]), [0.00105074, 0.00121761]], 
    248     [{'thick_core': 10.0, 
    249       'thick_layer': 15.0, 
    250       'radius': 3000.0, 
    251       'n_stacking': 1.0, 
    252       'sigma_d': 0.0, 
    253       'sld_core': 4.0, 
    254       'sld_layer': -0.4, 
    255       'solvent_sd': 5.0, 
    256       'theta': 90.0, 
    257       'phi': 20.0, 
    258       'scale': 0.01, 
    259       'background': 0.001, 
    260      }, (qx, qy), 0.0341738733124 ], 
    261230 
    262231    [{'thick_core': 10.0, 
Note: See TracChangeset for help on using the changeset viewer.