source: sasmodels/sasmodels/models/multilayer_vesicle.py @ 19e7ca7

core_shell_microgelscostrafo411magnetic_modelticket-1257-vesicle-productticket_1156ticket_1265_superballticket_822_more_unit_tests
Last change on this file since 19e7ca7 was 19e7ca7, checked in by richardh, 8 years ago

another change to multilayer_vesicle docu

  • Property mode set to 100644
File size: 3.8 KB
Line 
1r"""
2Definition
3----------
4
5This model is a trivial extension of the core_shell_sphere function to include
6*N* shells where the core is filled with solvent and the shells are interleaved
7with layers of solvent. For *N = 1*, this returns the same as the vesicle model,
8except for the normalisation, which here is to outermost volume.
9The shell thicknessess and SLD are constant for all shells as expected for
10a multilayer vesicle.
11
12.. figure:: img/multi_shell_geometry.jpg
13
14    Geometry of the multilayer_vesicle model.
15
16See the :ref:`core-shell-sphere` model for more documentation.
17
18The 2D scattering intensity is the same as 1D, regardless of the orientation
19of the q vector which is defined as:
20
21.. math::
22
23    q = \sqrt{q_x^2 + q_y^2}
24
25
26The outer most radius
27
28$radius + n\_pairs * thick\_shell + (n\_pairs- 1) * thick\_solvent$
29
30is used for both the volume fraction normalization and for the
31effective radius for *S(Q)* when $P(Q) * S(Q)$ is applied.
32
33For information about polarised and magnetic scattering, see
34the :ref:`magnetism` documentation.
35
36This code is based on the form factor calculations implemented in the NIST
37Center for Neutron Research provided c-library (Kline, 2006).
38
39References
40----------
41
42B Cabane, *Small Angle Scattering Methods*,
43in *Surfactant Solutions: New Methods of Investigation*,
44Ch.2, Surfactant Science Series Vol. 22, Ed. R Zana and M Dekker,
45New York, (1987).
46
47**Author:** NIST IGOR/DANSE **on:** pre 2010
48
49**Last Modified by:** Piotr Rozyczko**on:** Feb 24, 2016
50
51**Last Reviewed by:** Paul Butler **on:** March 20, 2016
52
53"""
54
55from numpy import inf
56
57name = "multilayer_vesicle"
58title = "P(Q) for a Multi-lamellar vesicle"
59description = """
60    multilayer_vesicle model parameters;
61    scale : scale factor for abs intensity if needed else 1.0
62    volfraction: volume fraction
63    radius : Core radius of the multishell
64    thick_shell: shell thickness
65    thick_solvent: water thickness
66    sld_solvent: solvent scattering length density
67    sld: shell scattering length density
68    n_pairs:number of "shell plus solvent" layer pairs
69    background: incoherent background
70        """
71category = "shape:sphere"
72
73# pylint: disable=bad-whitespace, line-too-long
74#   ["name", "units", default, [lower, upper], "type","description"],
75parameters = [
76    ["volfraction", "",  0.05, [0.0, 1],  "", "volume fraction of vesicles"],
77    ["radius", "Ang", 60.0, [0.0, inf],  "", "radius of solvent filled core"],
78    ["thick_shell", "Ang",        10.0, [0.0, inf],  "", "thickness of one shell"],
79    ["thick_solvent", "Ang",        10.0, [0.0, inf],  "", "solvent thickness between shells"],
80    ["sld_solvent",    "1e-6/Ang^2",  6.4, [-inf, inf], "sld", "solvent scattering length density"],
81    ["sld",   "1e-6/Ang^2",  0.4, [-inf, inf], "sld", "Shell scattering length density"],
82    ["n_pairs",     "",            2.0, [1.0, inf],  "", "Number of shell plus solvent layer pairs"],
83    ]
84# pylint: enable=bad-whitespace, line-too-long
85
86source = ["lib/sph_j1c.c", "multilayer_vesicle.c"]
87
88polydispersity = ["radius", "n_pairs"]
89
90demo = dict(scale=1, background=0,
91            volfraction=0.05,
92            radius=60.0,
93            thick_shell=10.0,
94            thick_solvent=10.0,
95            sld_solvent=6.4,
96            sld=0.4,
97            n_pairs=2.0)
98
99tests = [
100    # Accuracy tests based on content in test/utest_other_models.py
101    [{'radius': 60.0,
102      'thick_shell': 10.0,
103      'thick_solvent': 10.0,
104      'sld_solvent': 6.4,
105      'sld': 0.4,
106      'n_pairs': 2.0,
107      'scale': 1.0,
108      'background': 0.001,
109     }, 0.001, 122.1405],
110
111    [{'volfraction': 1.0,
112      'radius': 60.0,
113      'thick_shell': 10.0,
114      'thick_solvent': 10.0,
115      'sld_solvent': 6.4,
116      'sld': 0.4,
117      'n_pairs': 2.0,
118      'scale': 1.0,
119      'background': 0.001,
120     }, (0.001, 0.30903), 1.61873],
121    ]
Note: See TracBrowser for help on using the repository browser.