Changeset 16a8c63 in sasmodels for sasmodels/models/triaxial_ellipsoid.py


Ignore:
Timestamp:
Apr 7, 2017 8:59:30 AM (7 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
3fd0499, 1f65db5
Parents:
e6ab0d3 (diff), 43ff77c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'ticket-852-unit-tests' into ticket-890

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/triaxial_ellipsoid.py

    r15a90c1 r16a8c63  
    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 
     119from numpy import inf, sin, cos, pi 
    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 # TODO: need some unit tests! 
     179q = 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 
     182qx = q*cos(pi/6.0) 
     183qy = q*sin(pi/6.0) 
     184tests = [[{}, 0.05, 24.8839548033], 
     185#        [{'theta':80., 'phi':10.}, (qx, qy), 9999. ], 
     186        ] 
     187del qx, qy  # not necessary to delete, but cleaner 
Note: See TracChangeset for help on using the changeset viewer.