Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/stacked_disks.py

    rb7e8b94 r0b56f38  
    103103""" 
    104104 
    105 from numpy import inf 
     105from numpy import inf, sin, cos, pi 
    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, [0, inf],    "volume",      "Number of stacked layer/core/layer disks"], 
     128    ["n_stacking",  "",            1.0, [1, 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"], 
     
    152152# After redefinition of spherical coordinates - 
    153153# tests had in old coords theta=0, phi=0; new coords theta=90, phi=0 
    154 # but should not matter here as so far all the tests are 1D not 2D 
     154q = 0.1 
     155# april 6 2017, rkh added a 2d unit test, assume correct! 
     156qx = q*cos(pi/6.0) 
     157qy = q*sin(pi/6.0) 
    155158tests = [ 
    156159# Accuracy tests based on content in test/utest_extra_models.py. 
     
    186189    [{'thick_core': 10.0, 
    187190      'thick_layer': 15.0, 
     191      'radius': 100.0, 
     192      'n_stacking': 5, 
     193      'sigma_d': 0.0, 
     194      'sld_core': 4.0, 
     195      'sld_layer': -0.4, 
     196      'solvent_sd': 5.0, 
     197      'theta': 90.0, 
     198      'phi': 20.0, 
     199      'scale': 0.01, 
     200      'background': 0.001}, 
     201      (qx, qy), 0.0491167089952  ], 
     202    [{'thick_core': 10.0, 
     203      'thick_layer': 15.0, 
    188204      'radius': 3000.0, 
    189205      'n_stacking': 5, 
     
    228244      'background': 0.001, 
    229245     }, ([0.4, 0.5]), [0.00105074, 0.00121761]], 
     246    [{'thick_core': 10.0, 
     247      'thick_layer': 15.0, 
     248      'radius': 3000.0, 
     249      'n_stacking': 1.0, 
     250      'sigma_d': 0.0, 
     251      'sld_core': 4.0, 
     252      'sld_layer': -0.4, 
     253      'solvent_sd': 5.0, 
     254      'theta': 90.0, 
     255      'phi': 20.0, 
     256      'scale': 0.01, 
     257      'background': 0.001, 
     258     }, (qx, qy), 0.0341738733124 ], 
    230259 
    231260    [{'thick_core': 10.0, 
Note: See TracChangeset for help on using the changeset viewer.