Changeset ec1d4bc in sasmodels for sasmodels/models/multilayer_vesicle.py
- Timestamp:
- Feb 1, 2017 7:52:41 PM (7 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- d3e3f756
- Parents:
- 66ca2a6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/multilayer_vesicle.py
r925ad6e rec1d4bc 20 20 .. math:: 21 21 22 P(q) = \ frac{\text{scale.volfraction}}{V_t} F^2(q) + \text{background}22 P(q) = \text{scale}\frac{\phi}{V(R_N)} F^2(q) + \text{background} 23 23 24 24 where … … 26 26 .. math:: 27 27 28 F(q) = (\rho_ {shell}-\rho_{solv}) \sum_{i=1}^{n\_pairs} \left[29 3V( R_i)\frac{\sin(qR_i)-qR_i\cos(qR_i)}{(qR_i)^3} \\30 - 3V(R_i+t_s)\frac{\sin(q(R_i+t_s))-q(R_i+t_s)\cos(q(R_i+t_s))}{(q(R_i+t_s))^3}28 F(q) = (\rho_\text{shell}-\rho_\text{solv}) \sum_{i=1}^{N} \left[ 29 3V(r_i)\frac{\sin(qr_i) - qr_i\cos(qr_i)}{(qr_i)^3} 30 - 3V(R_i)\frac{\sin(qR_i) - qR_i\cos(qR_i)}{(qR_i)^3} 31 31 \right] 32 32 33 for 33 34 34 where $R_i = r_c + (i-1)(t_s + t_w)$ 35 36 where $V_t$ is the volume of the whole particle, $V(R)$ is the volume of a sphere 37 of radius $R$, $r_c$ is the radius of the core, $\rho_{shell}$ is the scattering length 38 density of a shell, $\rho_{solv}$ is the scattering length density of the solvent. 35 .. math:: 39 36 37 r_i &= r_c + (i-1)(t_s + t_w) && \text{ solvent radius before shell } i \\ 38 R_i &= r_i + t_s && \text{ shell radius for shell } i 39 40 $\phi$ is the volume fraction of particles, $V(r)$ is the volume of a sphere 41 of radius $r$, $r_c$ is the radius of the core, $t_s$ is the thickness of 42 the shell, $t_w$ is the thickness of the solvent layer between the shells, 43 $\rho_\text{shell}$ is the scattering length density of a shell, and 44 $\rho_\text{solv}$ is the scattering length density of the solvent. 40 45 41 46 The 2D scattering intensity is the same as 1D, regardless of the orientation … … 46 51 q = \sqrt{q_x^2 + q_y^2} 47 52 48 49 The outer most radius 50 51 $radius + n\_pairs * thick\_shell + (n\_pairs- 1) * thick\_solvent$ 52 53 is used for both the volume fraction normalization and for the 54 effective radius for *S(Q)* when $P(Q) * S(Q)$ is applied. 53 The outer-most shell radius $R_N$ is used as the effective radius 54 for $P(Q)$ when $P(Q) * S(Q)$ is applied. 55 55 56 56 For information about polarised and magnetic scattering, see … … 89 89 sld_solvent: solvent scattering length density 90 90 sld: shell scattering length density 91 n_ pairs:number of "shell plus solvent" layer pairs91 n_shells:number of "shell plus solvent" layer pairs 92 92 background: incoherent background 93 93 """ … … 98 98 parameters = [ 99 99 ["volfraction", "", 0.05, [0.0, 1], "", "volume fraction of vesicles"], 100 ["radius", "Ang", 60.0, [0.0, inf], " ", "radius of solvent filled core"],101 ["thick_shell", "Ang", 10.0, [0.0, inf], " ", "thickness of one shell"],102 ["thick_solvent", "Ang", 10.0, [0.0, inf], " ", "solvent thickness between shells"],100 ["radius", "Ang", 60.0, [0.0, inf], "volume", "radius of solvent filled core"], 101 ["thick_shell", "Ang", 10.0, [0.0, inf], "volume", "thickness of one shell"], 102 ["thick_solvent", "Ang", 10.0, [0.0, inf], "volume", "solvent thickness between shells"], 103 103 ["sld_solvent", "1e-6/Ang^2", 6.4, [-inf, inf], "sld", "solvent scattering length density"], 104 104 ["sld", "1e-6/Ang^2", 0.4, [-inf, inf], "sld", "Shell scattering length density"], 105 ["n_ pairs", "", 2.0, [1.0, inf], "", "Number of shell plus solvent layer pairs"],105 ["n_shells", "", 2.0, [1.0, inf], "volume", "Number of shell plus solvent layer pairs"], 106 106 ] 107 107 # pylint: enable=bad-whitespace, line-too-long … … 109 109 source = ["lib/sas_3j1x_x.c", "multilayer_vesicle.c"] 110 110 111 polydispersity = ["radius", "n_pairs"] 111 def ER(radius, thick_shell, thick_solvent, n_shells): 112 n_shells = int(n_shells+0.5) 113 return radius + n_shells * (thick_shell + thick_solvent) - thick_solvent 112 114 113 115 demo = dict(scale=1, background=0, … … 118 120 sld_solvent=6.4, 119 121 sld=0.4, 120 n_ pairs=2.0)122 n_shells=2.0) 121 123 122 124 tests = [ … … 127 129 'sld_solvent': 6.4, 128 130 'sld': 0.4, 129 'n_ pairs': 2.0,131 'n_shells': 2.0, 130 132 'scale': 1.0, 131 133 'background': 0.001, … … 138 140 'sld_solvent': 6.4, 139 141 'sld': 0.4, 140 'n_ pairs': 2.0,142 'n_shells': 2.0, 141 143 'scale': 1.0, 142 144 'background': 0.001,
Note: See TracChangeset
for help on using the changeset viewer.