Changeset 54954e1 in sasmodels for sasmodels/models/adsorbed_layer.py
- Timestamp:
- Mar 17, 2016 9:58:53 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:
- 03e8a6e, 3a45c2c
- Parents:
- 15bd6e7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/adsorbed_layer.py
rcb97bff r54954e1 17 17 I(q) = \text{scale} \cdot(\rho_\text{poly}-\rho_\text{solvent})^2 \left[\frac{6\pi\phi_\text{core}}{Q^2}\frac{\Gamma^2}{\delta_\text{poly}^2R_\text{core}} \exp(-Q^2\sigma^2)\right] + \text{background} 18 18 19 where *scale* is a scale factor, |rho|\ :sub:`poly` is the sld of the polymer (or surfactant) layer, |rho|\ :sub:`solv` is the sld of the solvent/medium and cores, |phi|\ :sub:`core` is the volume fraction of the core par aticles, |delta|\ :sub:`poly` is the bulk density of the polymer, |biggamma| is the adsorbed amount, and |sigma| is the second moment of the thickness distribution.19 where *scale* is a scale factor, |rho|\ :sub:`poly` is the sld of the polymer (or surfactant) layer, |rho|\ :sub:`solv` is the sld of the solvent/medium and cores, |phi|\ :sub:`core` is the volume fraction of the core particles, |delta|\ :sub:`poly` is the bulk density of the polymer, |biggamma| is the adsorbed amount, and |sigma| is the second moment of the thickness distribution. 20 20 21 21 Note that all parameters except the |sigma| are correlated so fitting more than one of these parameters will generally fail. Also note that unlike other shape models, no volume normalization is applied to this model (the calculation is exact). … … 46 46 ["density_poly", "g/cm3", 0.7, [0.0, inf], "", "Polymer density"], 47 47 ["radius", "Ang", 500.0, [0.0, inf], "", "Particle radius"], 48 ["vol _frac", "None", 0.14, [0.0, inf], "", "Particle vol fraction"],48 ["volfraction", "None", 0.14, [0.0, inf], "", "Particle vol fraction"], 49 49 ["polymer_sld", "1/Ang^2", 1.5e-06, [-inf, inf], "", "Polymer SLD"], 50 50 ["solvent_sld", "1/Ang^2", 6.3e-06, [-inf, inf], "", "Solvent SLD"]] … … 52 52 # NB: Scale and Background are implicit parameters on every model 53 53 def Iq(q, second_moment, adsorbed_amount, density_poly, radius, 54 vol _frac, polymer_sld, solvent_sld):54 volfraction, polymer_sld, solvent_sld): 55 55 # pylint: disable = missing-docstring 56 56 deltarhosqrd = (polymer_sld - solvent_sld) * (polymer_sld - solvent_sld) 57 numerator = 6.0 * pi * vol _frac* (adsorbed_amount * adsorbed_amount)57 numerator = 6.0 * pi * volfraction * (adsorbed_amount * adsorbed_amount) 58 58 denominator = (q * q) * (density_poly * density_poly) * radius 59 59 eterm = exp(-1.0 * (q * q) * (second_moment * second_moment)) … … 73 73 density_poly = 0.7, 74 74 radius = 500.0, 75 vol _frac= 0.14,75 volfraction = 0.14, 76 76 polymer_sld = 1.5e-06, 77 77 solvent_sld = 6.3e-06, … … 84 84 density_poly = 'density_poly', 85 85 radius = 'radius_core', 86 vol _frac= 'volf_cores',86 volfraction = 'volf_cores', 87 87 polymer_sld = 'sld_poly', 88 88 solvent_sld = 'sld_solv', … … 91 91 tests = [ 92 92 [{'scale': 1.0, 'second_moment': 23.0, 'adsorbed_amount': 1.9, 93 'density_poly': 0.7, 'radius': 500.0, 'vol _frac': 0.14,93 'density_poly': 0.7, 'radius': 500.0, 'volfraction': 0.14, 94 94 'polymer_sld': 1.5e-06, 'solvent_sld': 6.3e-06, 'background': 0.0}, 95 95 [0.0106939, 0.469418], [73.741, 9.65391e-53]],
Note: See TracChangeset
for help on using the changeset viewer.