Changeset 2222134 in sasmodels for sasmodels/models/core_shell_ellipsoid.py
- Timestamp:
- Sep 30, 2016 11:07:16 AM (8 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:
- a807206
- Parents:
- 6e5b2a7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/core_shell_ellipsoid.py
r40a87fa r2222134 52 52 .. note:: 53 53 The 2nd virial coefficient of the solid ellipsoid is calculated based on 54 the *radius_a* (= * polar_shell)* and *radius_b (=equat_shell)* values,54 the *radius_a* (= *radius_polar_shell)* and *radius_b (= radius_equat_shell)* values, 55 55 and used as the effective radius for *S(Q)* when $P(Q) * S(Q)$ is applied. 56 56 … … 82 82 single particle scattering amplitude. 83 83 [Parameters]: 84 equat_core = equatorial radius of core, Rminor_core,85 polar_core = polar radius of core, Rmajor_core,86 equat_shell = equatorial radius of shell, Rminor_outer,87 polar_shell = polar radius of shell, Rmajor_outer,84 radius_equat_core = equatorial radius of core, Rminor_core, 85 radius_polar_core = polar radius of core, Rmajor_core, 86 radius_equat_shell = equatorial radius of shell, Rminor_outer, 87 radius_polar_shell = polar radius of shell, Rmajor_outer, 88 88 sld_core = scattering length density of core, 89 89 sld_shell = scattering length density of shell, … … 102 102 # ["name", "units", default, [lower, upper], "type", "description"], 103 103 parameters = [ 104 [" equat_core", "Ang", 200, [0, inf], "volume", "Equatorial radius of core, r minor core"],105 [" polar_core", "Ang", 10, [0, inf], "volume", "Polar radius of core, r major core"],106 [" equat_shell", "Ang", 250, [0, inf], "volume", "Equatorial radius of shell, r minor outer"],107 [" polar_shell", "Ang", 30, [0, inf], "volume", "Polar radius of shell, r major outer"],104 ["radius_equat_core", "Ang", 200, [0, inf], "volume", "Equatorial radius of core, r minor core"], 105 ["radius_polar_core", "Ang", 10, [0, inf], "volume", "Polar radius of core, r major core"], 106 ["radius_equat_shell", "Ang", 250, [0, inf], "volume", "Equatorial radius of shell, r minor outer"], 107 ["radius_polar_shell", "Ang", 30, [0, inf], "volume", "Polar radius of shell, r major outer"], 108 108 ["sld_core", "1e-6/Ang^2", 2, [-inf, inf], "sld", "Core scattering length density"], 109 109 ["sld_shell", "1e-6/Ang^2", 1, [-inf, inf], "sld", "Shell scattering length density"], … … 116 116 source = ["lib/sph_j1c.c", "lib/gfn.c", "lib/gauss76.c", "core_shell_ellipsoid.c"] 117 117 118 def ER( equat_core, polar_core, equat_shell,polar_shell):118 def ER(radius_equat_core, radius_polar_core, radius_equat_shell, radius_polar_shell): 119 119 """ 120 120 Returns the effective radius used in the S*P calculation 121 121 """ 122 122 from .ellipsoid import ER as ellipsoid_ER 123 return ellipsoid_ER( polar_shell,equat_shell)123 return ellipsoid_ER(radius_polar_shell, radius_equat_shell) 124 124 125 125 126 126 demo = dict(scale=1, background=0.001, 127 equat_core=200.0,128 polar_core=10.0,129 equat_shell=250.0,130 polar_shell=30.0,127 radius_equat_core=200.0, 128 radius_polar_core=10.0, 129 radius_equat_shell=250.0, 130 radius_polar_shell=30.0, 131 131 sld_core=2.0, 132 132 sld_shell=1.0, … … 142 142 tests = [ 143 143 # Accuracy tests based on content in test/utest_other_models.py 144 [{' equat_core': 200.0,145 ' polar_core': 20.0,146 ' equat_shell': 250.0,147 ' polar_shell': 30.0,144 [{'radius_equat_core': 200.0, 145 'radius_polar_core': 20.0, 146 'radius_equat_shell': 250.0, 147 'radius_polar_shell': 30.0, 148 148 'sld_core': 2.0, 149 149 'sld_shell': 1.0, … … 156 156 [{'background': 0.01}, 0.1, 8.86741], 157 157 158 [{' equat_core': 20.0,159 ' polar_core': 200.0,160 ' equat_shell': 54.0,161 ' polar_shell': 3.0,158 [{'radius_equat_core': 20.0, 159 'radius_polar_core': 200.0, 160 'radius_equat_shell': 54.0, 161 'radius_polar_shell': 3.0, 162 162 'sld_core': 20.0, 163 163 'sld_shell': 10.0, … … 169 169 [{'background': 0.001}, (0.4, 0.5), 0.00170471], 170 170 171 [{' equat_core': 20.0,172 ' polar_core': 200.0,173 ' equat_shell': 54.0,174 ' polar_shell': 3.0,171 [{'radius_equat_core': 20.0, 172 'radius_polar_core': 200.0, 173 'radius_equat_shell': 54.0, 174 'radius_polar_shell': 3.0, 175 175 'sld_core': 20.0, 176 176 'sld_shell': 10.0,
Note: See TracChangeset
for help on using the changeset viewer.