1 | r""" |
---|
2 | Definition |
---|
3 | ---------- |
---|
4 | |
---|
5 | This 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 |
---|
7 | with layers of solvent. For *N = 1*, this returns the same as the vesicle model, |
---|
8 | except for the normalisation, which here is to outermost volume. |
---|
9 | The shell thicknessess and SLD are constant for all shells as expected for |
---|
10 | a multilayer vesicle. |
---|
11 | |
---|
12 | .. figure:: img/multi_shell_geometry.jpg |
---|
13 | |
---|
14 | Geometry of the multilayer_vesicle model. |
---|
15 | |
---|
16 | See the :ref:`core-shell-sphere` model for more documentation. |
---|
17 | |
---|
18 | The 2D scattering intensity is the same as 1D, regardless of the orientation |
---|
19 | of the q vector which is defined as: |
---|
20 | |
---|
21 | .. math:: |
---|
22 | |
---|
23 | q = \sqrt{q_x^2 + q_y^2} |
---|
24 | |
---|
25 | |
---|
26 | The outer most radius |
---|
27 | |
---|
28 | $radius + n\_pairs * thick\_shell + (n\_pairs- 1) * thick\_solvent$ |
---|
29 | |
---|
30 | is used for both the volume fraction normalization and for the |
---|
31 | effective radius for *S(Q)* when $P(Q) * S(Q)$ is applied. |
---|
32 | |
---|
33 | For information about polarised and magnetic scattering, see |
---|
34 | the :ref:`magnetism` documentation. |
---|
35 | |
---|
36 | This code is based on the form factor calculations implemented in the NIST |
---|
37 | Center for Neutron Research provided c-library (Kline, 2006). |
---|
38 | |
---|
39 | References |
---|
40 | ---------- |
---|
41 | |
---|
42 | B Cabane, *Small Angle Scattering Methods*, |
---|
43 | in *Surfactant Solutions: New Methods of Investigation*, |
---|
44 | Ch.2, Surfactant Science Series Vol. 22, Ed. R Zana and M Dekker, |
---|
45 | New 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 | |
---|
55 | from numpy import inf |
---|
56 | |
---|
57 | name = "multilayer_vesicle" |
---|
58 | title = "P(Q) for a Multi-lamellar vesicle" |
---|
59 | description = """ |
---|
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 | """ |
---|
71 | category = "shape:sphere" |
---|
72 | |
---|
73 | # pylint: disable=bad-whitespace, line-too-long |
---|
74 | # ["name", "units", default, [lower, upper], "type","description"], |
---|
75 | parameters = [ |
---|
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 | |
---|
86 | source = ["lib/sph_j1c.c", "multilayer_vesicle.c"] |
---|
87 | |
---|
88 | polydispersity = ["radius", "n_pairs"] |
---|
89 | |
---|
90 | demo = 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 | |
---|
99 | tests = [ |
---|
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 | ] |
---|