Changeset 7e6bea81 in sasmodels


Ignore:
Timestamp:
Sep 12, 2016 1:30:18 AM (8 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
7b68dc5
Parents:
897ca7f
Message:

sphere: tweak docs and add test cases

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/sphere.py

    r9a4811a r7e6bea81  
    22For information about polarised and magnetic scattering, see 
    33the :ref:`magnetism` documentation. 
    4 documentation. 
    54 
    65Definition 
     
    1615 
    1716where *scale* is a volume fraction, $V$ is the volume of the scatterer, 
    18 $r$ is the radius of the sphere, *background* is the background level and 
     17$r$ is the radius of the sphere and *background* is the background level. 
    1918*sld* and *sld_solvent* are the scattering length densities (SLDs) of the 
    20 scatterer and the solvent respectively. 
     19scatterer and the solvent respectively, whose difference is $\Delta\rho$. 
    2120 
    2221Note that if your data is in absolute scale, the *scale* should represent 
     
    9190            radius=120, 
    9291            radius_pd=.2, radius_pd_n=45) 
     92 
     93tests = [ 
     94    [{}, 0.2, 0.726362], 
     95    [{"scale": 1., "background": 0., "sld": 6., "sld_solvent": 1., 
     96      "radius": 120., "radius_pd": 0.2, "radius_pd_n":45}, 
     97     0.2, 0.228843], 
     98    [{"radius": 120., "radius_pd": 0.2, "radius_pd_n":45}, "ER", 120.], 
     99    [{"radius": 120., "radius_pd": 0.2, "radius_pd_n":45}, "VR", 1.], 
     100] 
     101 
     102 
Note: See TracChangeset for help on using the changeset viewer.