Changeset a807206 in sasmodels for sasmodels/models/poly_gauss_coil.py
- Timestamp:
- Sep 30, 2016 10:42:06 PM (7 years ago)
- 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:
- caddb14, 5031ca3
- Parents:
- 2222134
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/poly_gauss_coil.py
r40a87fa ra807206 74 74 parameters = [ 75 75 ["i_zero", "1/cm", 70.0, [0.0, inf], "", "Intensity at q=0"], 76 ["r adius_gyration", "Ang", 75.0, [0.0, inf], "", "Radius of gyration"],76 ["rg", "Ang", 75.0, [0.0, inf], "", "Radius of gyration"], 77 77 ["polydispersity", "None", 2.0, [1.0, inf], "", "Polymer Mw/Mn"], 78 78 ] … … 80 80 81 81 # NB: Scale and Background are implicit parameters on every model 82 def Iq(q, i_zero, r adius_gyration, polydispersity):82 def Iq(q, i_zero, rg, polydispersity): 83 83 # pylint: disable = missing-docstring 84 84 u = polydispersity - 1.0 85 z = (q*r adius_gyration)**2 / (1.0 + 2.0*u)85 z = (q*rg)**2 / (1.0 + 2.0*u) 86 86 # need to trap the case of the polydispersity being 1 (ie, monodisperse!) 87 87 if polydispersity == 1.0: … … 97 97 demo = dict(scale=1.0, 98 98 i_zero=70.0, 99 r adius_gyration=75.0,99 rg=75.0, 100 100 polydispersity=2.0, 101 101 background=0.0) … … 103 103 # these unit test values taken from SasView 3.1.2 104 104 tests = [ 105 [{'scale': 1.0, 'i_zero': 70.0, 'r adius_gyration': 75.0,105 [{'scale': 1.0, 'i_zero': 70.0, 'rg': 75.0, 106 106 'polydispersity': 2.0, 'background': 0.0}, 107 107 [0.0106939, 0.469418], [57.6405, 0.169016]],
Note: See TracChangeset
for help on using the changeset viewer.