Changeset 14207bb in sasmodels for sasmodels/models/parallelepiped.py


Ignore:
Timestamp:
Apr 7, 2017 2:57:41 AM (7 years ago)
Author:
richardh
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
1916c52
Parents:
15a90c1
Message:

doc changes and 2d test in parallelepipeds so will perhaps build

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/parallelepiped.py

    r15a90c1 r14207bb  
    174174 
    175175import numpy as np 
    176 from numpy import pi, inf, sqrt 
     176from numpy import pi, inf, sqrt, sin, cos 
    177177 
    178178name = "parallelepiped" 
     
    243243            phi_pd=10, phi_pd_n=1, 
    244244            psi_pd=10, psi_pd_n=10) 
    245  
    246 qx, qy = 0.2 * np.cos(2.5), 0.2 * np.sin(2.5) 
     245# rkh 7/4/17 add random unit test for 2d, note make all params different, 2d values not tested against other codes or models 
     246qx, qy = 0.2 * cos(pi/6.), 0.2 * sin(pi/6.) 
    247247tests = [[{}, 0.2, 0.17758004974], 
    248248         [{}, [0.2], [0.17758004974]], 
    249          [{'theta':10.0, 'phi':10.0}, (qx, qy), 0.00560296014], 
    250          [{'theta':10.0, 'phi':10.0}, [(qx, qy)], [0.00560296014]], 
     249         [{'theta':10.0, 'phi':20.0}, (qx, qy), 0.0089517140475], 
     250         [{'theta':10.0, 'phi':20.0}, [(qx, qy)], [0.0089517140475]], 
    251251        ] 
    252252del qx, qy  # not necessary to delete, but cleaner 
Note: See TracChangeset for help on using the changeset viewer.