Changes in / [16a8c63:e6ab0d3] in sasmodels


Ignore:
Location:
sasmodels/models
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/barbell.py

    r0b56f38 rfcb33e4  
    8787* **Last Reviewed by:** Richard Heenan **Date:** January 4, 2017 
    8888""" 
    89 from numpy import inf, sin, cos, pi 
     89from numpy import inf 
    9090 
    9191name = "barbell" 
     
    125125            phi_pd=15, phi_pd_n=0, 
    126126           ) 
    127 q = 0.1 
    128 # april 6 2017, rkh add unit tests, NOT compared with any other calc method, assume correct! 
    129 qx = q*cos(pi/6.0) 
    130 qy = q*sin(pi/6.0) 
    131 tests = [[{}, 0.075, 25.5691260532], 
    132         [{'theta':80., 'phi':10.}, (qx, qy), 3.04233067789], 
    133         ] 
    134 del qx, qy  # not necessary to delete, but cleaner 
  • sasmodels/models/bcc_paracrystal.py

    re2d6e3b r925ad6e  
    9999""" 
    100100 
    101 from numpy import inf, pi 
     101from numpy import inf 
    102102 
    103103name = "bcc_paracrystal" 
     
    141141    psi_pd=15, psi_pd_n=0, 
    142142    ) 
    143 # april 6 2017, rkh add unit tests, NOT compared with any other calc method, assume correct! 
    144 # add 2d test later 
    145 q =4.*pi/220. 
    146 tests = [ 
    147     [{ }, 
    148      [0.001, q, 0.215268], [1.46601394721, 2.85851284174, 0.00866710287078]], 
    149 ] 
  • sasmodels/models/capped_cylinder.py

    r0b56f38 rfcb33e4  
    9191 
    9292""" 
    93 from numpy import inf, sin, cos, pi 
     93from numpy import inf 
    9494 
    9595name = "capped_cylinder" 
     
    145145            theta_pd=15, theta_pd_n=45, 
    146146            phi_pd=15, phi_pd_n=1) 
    147 q = 0.1 
    148 # april 6 2017, rkh add unit tests, NOT compared with any other calc method, assume correct! 
    149 qx = q*cos(pi/6.0) 
    150 qy = q*sin(pi/6.0) 
    151 tests = [[{}, 0.075, 26.0698570695], 
    152         [{'theta':80., 'phi':10.}, (qx, qy), 0.561811990502], 
    153         ] 
    154 del qx, qy  # not necessary to delete, but cleaner 
  • sasmodels/models/core_shell_bicelle.py

    r0b56f38 r8afefae  
    8888""" 
    8989 
    90 from numpy import inf, sin, cos, pi 
     90from numpy import inf, sin, cos 
    9191 
    9292name = "core_shell_bicelle" 
     
    155155            theta=90, 
    156156            phi=0) 
    157 q = 0.1 
    158 # april 6 2017, rkh add unit tests, NOT compared with any other calc method, assume correct! 
    159 qx = q*cos(pi/6.0) 
    160 qy = q*sin(pi/6.0) 
    161 tests = [[{}, 0.05, 7.4883545957], 
    162         [{'theta':80., 'phi':10.}, (qx, qy), 2.81048892474 ], 
    163         ] 
    164 del qx, qy  # not necessary to delete, but cleaner 
    165157 
     158#qx, qy = 0.4 * cos(pi/2.0), 0.5 * sin(0) 
  • sasmodels/models/core_shell_bicelle_elliptical.py

    r15a90c1 r15a90c1  
    9999""" 
    100100 
    101 from numpy import inf, sin, cos, pi 
     101from numpy import inf, sin, cos 
    102102 
    103103name = "core_shell_bicelle_elliptical" 
     
    150150            psi=0) 
    151151 
    152 q = 0.1 
    153 # april 6 2017, rkh added a 2d unit test, NOT READY YET pull #890 branch assume correct! 
    154 qx = q*cos(pi/6.0) 
    155 qy = q*sin(pi/6.0) 
     152#qx, qy = 0.4 * cos(pi/2.0), 0.5 * sin(0) 
    156153 
    157154tests = [ 
     
    162159    'sld_core':4.0, 'sld_face':7.0, 'sld_rim':1.0, 'sld_solvent':6.0, 'background':0.0}, 
    163160    0.015, 286.540286], 
    164 #    [{'theta':80., 'phi':10.}, (qx, qy), 7.88866563001 ], 
    165         ] 
    166  
    167 del qx, qy  # not necessary to delete, but cleaner 
     161] 
  • sasmodels/models/core_shell_cylinder.py

    r0b56f38 r8e68ea0  
    7373""" 
    7474 
    75 from numpy import pi, inf, sin, cos 
     75from numpy import pi, inf 
    7676 
    7777name = "core_shell_cylinder" 
     
    151151            theta_pd=15, theta_pd_n=45, 
    152152            phi_pd=15, phi_pd_n=1) 
    153 q = 0.1 
    154 # april 6 2017, rkh add unit tests, NOT compared with any other calc method, assume correct! 
    155 qx = q*cos(pi/6.0) 
    156 qy = q*sin(pi/6.0) 
    157 tests = [[{}, 0.075, 10.8552692237], 
    158         [{}, (qx, qy), 0.444618752741 ], 
    159         ] 
    160 del qx, qy  # not necessary to delete, but cleaner 
     153 
  • sasmodels/models/ellipsoid.py

    r0b56f38 r4b0a294  
    120120""" 
    121121 
    122 from numpy import inf, sin, cos, pi 
     122from numpy import inf 
    123123 
    124124name = "ellipsoid" 
     
    190190            theta_pd=15, theta_pd_n=45, 
    191191            phi_pd=15, phi_pd_n=1) 
    192 q = 0.1 
    193 # april 6 2017, rkh add unit tests, NOT compared with any other calc method, assume correct! 
    194 qx = q*cos(pi/6.0) 
    195 qy = q*sin(pi/6.0) 
    196 tests = [[{}, 0.05, 54.8525847025], 
    197         [{'theta':80., 'phi':10.}, (qx, qy), 1.74134670026 ], 
    198         ] 
    199 del qx, qy  # not necessary to delete, but cleaner 
  • sasmodels/models/elliptical_cylinder.py

    r15a90c1 r15a90c1  
    109109""" 
    110110 
    111 from numpy import pi, inf, sqrt, sin, cos 
     111from numpy import pi, inf, sqrt 
    112112 
    113113name = "elliptical_cylinder" 
     
    150150                           + (length + radius) * (length + pi * radius)) 
    151151    return 0.5 * (ddd) ** (1. / 3.) 
    152 q = 0.1 
    153 # april 6 2017, rkh added a 2d unit test, NOT READY YET pull #890 branch assume correct! 
    154 qx = q*cos(pi/6.0) 
    155 qy = q*sin(pi/6.0) 
    156152 
    157153tests = [ 
     
    163159      'sld_solvent':1.0, 'background':0.0}, 
    164160     0.001, 675.504402], 
    165 #    [{'theta':80., 'phi':10.}, (qx, qy), 7.88866563001 ], 
    166161] 
  • sasmodels/models/fcc_paracrystal.py

    re2d6e3b r925ad6e  
    9090""" 
    9191 
    92 from numpy import inf, pi 
     92from numpy import inf 
    9393 
    9494name = "fcc_paracrystal" 
     
    128128            psi_pd=15, psi_pd_n=0, 
    129129           ) 
    130 # april 6 2017, rkh add unit tests, NOT compared with any other calc method, assume correct! 
    131 # add 2d test later 
    132 q =4.*pi/220. 
    133 tests = [ 
    134     [{ }, 
    135      [0.001, q, 0.215268], [0.275164706668, 5.7776842567, 0.00958167119232]], 
    136 ] 
  • sasmodels/models/hollow_cylinder.py

    r0b56f38 raea2e2a  
    6060""" 
    6161 
    62 from numpy import pi, inf, sin, cos 
     62from numpy import pi, inf 
    6363 
    6464name = "hollow_cylinder" 
     
    129129            theta_pd=10, theta_pd_n=5, 
    130130           ) 
    131 q = 0.1 
    132 # april 6 2017, rkh added a 2d unit test, assume correct! 
    133 qx = q*cos(pi/6.0) 
    134 qy = q*sin(pi/6.0) 
     131 
    135132# Parameters for unit tests 
    136133tests = [ 
    137134    [{}, 0.00005, 1764.926], 
    138135    [{}, 'VR', 1.8], 
    139     [{}, 0.001, 1756.76], 
    140     [{}, (qx, qy), 2.36885476192  ], 
    141         ] 
    142 del qx, qy  # not necessary to delete, but cleaner 
     136    [{}, 0.001, 1756.76] 
     137    ] 
  • sasmodels/models/stacked_disks.py

    r0b56f38 rb7e8b94  
    103103""" 
    104104 
    105 from numpy import inf, sin, cos, pi 
     105from numpy import inf 
    106106 
    107107name = "stacked_disks" 
     
    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. 
     
    189186    [{'thick_core': 10.0, 
    190187      '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, 
    204188      'radius': 3000.0, 
    205189      'n_stacking': 5, 
     
    244228      'background': 0.001, 
    245229     }, ([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 ], 
    259230 
    260231    [{'thick_core': 10.0, 
  • sasmodels/models/triaxial_ellipsoid.py

    r15a90c1 r15a90c1  
    8686The contrast $\Delta\rho$ is defined as SLD(ellipsoid) - SLD(solvent).  In the 
    8787parameters, $R_a$ is the minor equatorial radius, $R_b$ is the major 
    88 equatorial radius, and $R_c$ is the polar radius of the ellipsoid. 
     88equatorial radius, and $R_c$ is the polar radius of the ellipsoid.  
    8989 
    9090NB: The 2nd virial coefficient of the triaxial solid ellipsoid is 
     
    117117""" 
    118118 
    119 from numpy import inf, sin, cos, pi 
     119from numpy import inf 
    120120 
    121121name = "triaxial_ellipsoid" 
     
    157157    from .ellipsoid import ER as ellipsoid_ER 
    158158 
    159     # now that radii can be in any size order, radii need sorting a,b,c where a~b and c is either much smaller 
     159    # now that radii can be in any size order, radii need sorting a,b,c where a~b and c is either much smaller  
    160160    # or much larger 
    161161    radii = np.vstack((radius_equat_major, radius_equat_minor, radius_polar)) 
     
    177177            psi_pd=15, psi_pd_n=1) 
    178178 
    179 q = 0.1 
    180 # april 6 2017, rkh add unit tests, NOT compared with any other calc method, assume correct! 
    181 # add 2d test after pull #890 
    182 qx = q*cos(pi/6.0) 
    183 qy = q*sin(pi/6.0) 
    184 tests = [[{}, 0.05, 24.8839548033], 
    185 #        [{'theta':80., 'phi':10.}, (qx, qy), 9999. ], 
    186         ] 
    187 del qx, qy  # not necessary to delete, but cleaner 
     179# TODO: need some unit tests! 
Note: See TracChangeset for help on using the changeset viewer.