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