Changeset 29172aa in sasmodels for sasmodels/models/core_shell_ellipsoid.py
- Timestamp:
- Mar 18, 2016 4:25:12 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:
- 325e89a
- Parents:
- 76d78c2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/core_shell_ellipsoid.py
r5111921 r29172aa 1 1 r""" 2 2 This model provides the form factor, $P(q)$, for a core shell ellipsoid (below) 3 where the form factor is normalized by the volume of the cylinder.3 where the form factor is normalized by the volume of the outer [CHECK]. 4 4 5 5 .. math:: … … 7 7 P(q) = scale * \left<f^2\right>/V + background 8 8 9 where the volume $V = (4/3)\pi( r_{maj}r_{min}^2)$ and the averaging $< >$ is9 where the volume $V = (4/3)\pi(R_{major\_outer}R_{minor\_outer}^2)$ and the averaging $< >$ is 10 10 applied over all orientations for 1D. 11 11 … … 22 22 23 23 P(q) = \frac{scale}{V}\int_0^1 24 \left|F(q,r_{min },r_{max},\alpha)\right|^2d\alpha + background24 \left|F(q,r_{minor\_core},r_{major\_core},\alpha) + F(q,r_{major\_outer},r_{major\_outer},\alpha)\right|^2d\alpha + background 25 25 26 \left|F(q,r_{min },r_{max},\alpha)\right|=V\Delta \rho \cdot (3j_1(u)/u)26 \left|F(q,r_{minor},r_{major},\alpha)\right|=(4\pi/3)r_{major}r_{minor}^2 \Delta \rho \cdot (3j_1(u)/u) 27 27 28 u = q\left[ r_{maj }^2\alpha ^2 + r_{min}^2(1-\alpha ^2)\right]^{1/2}28 u = q\left[ r_{major}^2\alpha ^2 + r_{minor}^2(1-\alpha ^2)\right]^{1/2} 29 29 30 30 where … … 43 43 polar core radius, *equat_shell* = $r_{min}$ (or equatorial outer radius), 44 44 and *polar_shell* = $r_{maj}$ (or polar outer radius). 45 46 Note:It is the users' responsibility to ensure that shell radii are larger than 47 the core radii, especially if both are polydisperse, in which case the 48 core_shell_ellipsoid_xt model may be much better. 49 45 50 46 51 .. note:: … … 77 82 single particle scattering amplitude. 78 83 [Parameters]: 79 equat_core = equatorial radius of core, 80 polar_core = polar radius of core, 81 equat_shell = equatorial radius of shell, 82 polar_shell = polar radius (revolution axis) of shell,83 core_sld = SLD_core84 s hell_sld = SLD_shell85 s olvent_sld = SLD_solvent84 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, 88 sld_core = scattering length density of core, 89 sld_shell = scattering length density of shell, 90 sld_solvent = scattering length density of solvent, 86 91 background = Incoherent bkg 87 92 scale =scale 88 93 Note:It is the users' responsibility to ensure 89 that shell radii are larger than core radii. 94 that shell radii are larger than core radii, 95 especially if both are polydisperse. 90 96 oblate: polar radius < equatorial radius 91 97 prolate : polar radius > equatorial radius … … 97 103 # ["name", "units", default, [lower, upper], "type", "description"], 98 104 parameters = [ 99 ["equat_core", "Ang", 200, [0, inf], "volume", "Equatorial radius of core "],100 ["polar_core", "Ang", 10, [0, inf], "volume", "Polar radius of core "],101 ["equat_shell", "Ang", 250, [0, inf], "volume", "Equatorial radius of shell "],102 ["polar_shell", "Ang", 30, [0, inf], "volume", "Polar radius of shell "],103 [" core_sld", "1e-6/Ang^2", 2, [-inf, inf], "", "Core scattering length density"],104 ["s hell_sld", "1e-6/Ang^2", 1, [-inf, inf], "", "Shell scattering length density"],105 ["s olvent_sld", "1e-6/Ang^2", 6.3, [-inf, inf], "", "Solvent scattering length density"],105 ["equat_core", "Ang", 200, [0, inf], "volume", "Equatorial radius of core, Rminor_core "], 106 ["polar_core", "Ang", 10, [0, inf], "volume", "Polar radius of core, Rmajor_core"], 107 ["equat_shell", "Ang", 250, [0, inf], "volume", "Equatorial radius of shell, Rminor_outer "], 108 ["polar_shell", "Ang", 30, [0, inf], "volume", "Polar radius of shell, Rmajor_outer"], 109 ["sld_core", "1e-6/Ang^2", 2, [-inf, inf], "sld", "Core scattering length density"], 110 ["sld_shell", "1e-6/Ang^2", 1, [-inf, inf], "sld", "Shell scattering length density"], 111 ["sld_solvent", "1e-6/Ang^2", 6.3, [-inf, inf], "sld", "Solvent scattering length density"], 106 112 ["theta", "degrees", 0, [-inf, inf], "orientation", "Oblate orientation wrt incoming beam"], 107 113 ["phi", "degrees", 0, [-inf, inf], "orientation", "Oblate orientation in the plane of the detector"], … … 116 122 equat_shell=250.0, 117 123 polar_shell=30.0, 118 core_sld=2.0,119 s hell_sld=1.0,120 s olvent_sld=6.3,124 sld_core=2.0, 125 sld_shell=1.0, 126 sld_solvent=6.3, 121 127 theta=0, 122 128 phi=0) … … 124 130 oldname = 'CoreShellEllipsoidModel' 125 131 126 oldpars = dict(core_sld='sld_core', 127 shell_sld='sld_shell', 128 solvent_sld='sld_solvent', 132 oldpars = dict(equat_core='equat_core',polar_core='polar_core',equat_shell='equat_shell',polar_shell='polar_shell', 133 sld_core='sld_core', 134 sld_shell='sld_shell', 135 sld_solvent='sld_solvent', 129 136 theta='axis_theta', 130 137 phi='axis_phi') … … 141 148 'equat_shell': 250.0, 142 149 'polar_shell': 30.0, 143 ' core_sld': 2.0,144 's hell_sld': 1.0,145 's olvent_sld': 6.3,150 'sld_core': 2.0, 151 'sld_shell': 1.0, 152 'sld_solvent': 6.3, 146 153 'background': 0.001, 147 154 'scale': 1.0, … … 155 162 'equat_shell': 54.0, 156 163 'polar_shell': 3.0, 157 ' core_sld': 20.0,158 's hell_sld': 10.0,159 's olvent_sld': 6.0,164 'sld_core': 20.0, 165 'sld_shell': 10.0, 166 'sld_solvent': 6.0, 160 167 'background': 0.0, 161 168 'scale': 1.0, … … 168 175 'equat_shell': 54.0, 169 176 'polar_shell': 3.0, 170 ' core_sld': 20.0,171 's hell_sld': 10.0,172 's olvent_sld': 6.0,177 'sld_core': 20.0, 178 'sld_shell': 10.0, 179 'sld_solvent': 6.0, 173 180 'background': 0.01, 174 181 'scale': 0.01,
Note: See TracChangeset
for help on using the changeset viewer.