1 | r""" |
---|
2 | This model provides the form factor, *P(q)*, for a multi-lamellar vesicle |
---|
3 | with *N* shells where the core is filled with solvent and the shells are |
---|
4 | interleaved with layers of solvent. For *N = 1*, this returns the VesicleModel. |
---|
5 | |
---|
6 | For information about polarised and magnetic scattering, click here_. |
---|
7 | |
---|
8 | .. _here: polar_mag_help.html |
---|
9 | |
---|
10 | Definition |
---|
11 | ---------- |
---|
12 | |
---|
13 | This model is a trivial extension of the CoreShell function to a larger number |
---|
14 | of shells. See the core_shell_ function for a diagram and documentation. |
---|
15 | |
---|
16 | .. _core_shell: core_shell_sphere.html |
---|
17 | |
---|
18 | Be careful! The SLDs and scale can be highly correlated. Hold as many of these |
---|
19 | parameters fixed as possible. |
---|
20 | |
---|
21 | .. figure:: img/multi_shell_geometry.jpg |
---|
22 | |
---|
23 | The 2D scattering intensity is the same as 1D, regardless of the orientation |
---|
24 | of the q vector which is defined as: |
---|
25 | |
---|
26 | .. math:: |
---|
27 | |
---|
28 | q = \sqrt{q_x^2 + q_y^2} |
---|
29 | |
---|
30 | .. note: |
---|
31 | The outer most radius |
---|
32 | $core_radius + n_pairs * s_thickness + (n_pairs - 1) * w_thickness$ |
---|
33 | is used as the effective radius for *S(Q)* when $P(Q) * S(Q)$ is applied. |
---|
34 | |
---|
35 | |
---|
36 | Our model uses the form factor calculations implemented in a c-library provided |
---|
37 | by the NIST Center for Neutron Research (Kline, 2006). |
---|
38 | |
---|
39 | Reference |
---|
40 | --------- |
---|
41 | B Cabane, *Small Angle Scattering Methods*, |
---|
42 | in *Surfactant Solutions: New Methods of Investigation*, |
---|
43 | Ch.2, Surfactant Science Series Vol. 22, Ed. R Zana and M Dekker, |
---|
44 | New York, (1987). |
---|
45 | |
---|
46 | """ |
---|
47 | |
---|
48 | from numpy import inf |
---|
49 | |
---|
50 | name = "multi_shell" |
---|
51 | title = "Multi shell model" |
---|
52 | description = """ |
---|
53 | MultiShell (Sphere) Model (or Multilamellar Vesicles): Model parameters; |
---|
54 | scale : scale factor |
---|
55 | core_radius : Core radius of the multishell |
---|
56 | s_thickness: shell thickness |
---|
57 | w_thickness: water thickness |
---|
58 | core_sld: core scattering length density |
---|
59 | shell_sld: shell scattering length density |
---|
60 | n_pairs:number of pairs of water/shell |
---|
61 | background: incoherent background |
---|
62 | """ |
---|
63 | category = "shape:sphere" |
---|
64 | |
---|
65 | # pylint: disable=bad-whitespace, line-too-long |
---|
66 | # ["name", "units", default, [lower, upper], "type","description"], |
---|
67 | parameters = [ |
---|
68 | ["core_radius", "Ang", 60.0, [0.0, inf], "", "Core radius of the multishell"], |
---|
69 | ["s_thickness", "Ang", 10.0, [0.0, inf], "", "Shell thickness"], |
---|
70 | ["w_thickness", "Ang", 10.0, [0.0, inf], "", "Water thickness"], |
---|
71 | ["core_sld", "1e-6/Ang^2", 6.4, [-inf, inf], "", "Core scattering length density"], |
---|
72 | ["shell_sld", "1e-6/Ang^2", 0.4, [-inf, inf], "", "Shell scattering length density"], |
---|
73 | ["n_pairs", "", 2.0, [1.0, inf], "", "Number of pairs of water and shell"], |
---|
74 | ] |
---|
75 | # pylint: enable=bad-whitespace, line-too-long |
---|
76 | |
---|
77 | source = ["lib/sph_j1c.c", "multi_shell.c"] |
---|
78 | |
---|
79 | polydispersity = ["core_radius", "n_pairs"] |
---|
80 | |
---|
81 | demo = dict(scale=1, background=0, |
---|
82 | core_radius=60.0, |
---|
83 | s_thickness=10.0, |
---|
84 | w_thickness=10.0, |
---|
85 | core_sld=6.4, |
---|
86 | shell_sld=0.4, |
---|
87 | n_pairs=2.0) |
---|
88 | |
---|
89 | oldname = 'MultiShellModel' |
---|
90 | oldpars = dict() |
---|
91 | |
---|
92 | tests = [ |
---|
93 | # Accuracy tests based on content in test/utest_other_models.py |
---|
94 | [{'core_radius': 60.0, |
---|
95 | 's_thickness': 10.0, |
---|
96 | 'w_thickness': 10.0, |
---|
97 | 'core_sld': 6.4, |
---|
98 | 'shell_sld': 0.4, |
---|
99 | 'n_pairs': 2.0, |
---|
100 | 'scale': 1.0, |
---|
101 | 'background': 0.001, |
---|
102 | }, 0.001, 2442.81], |
---|
103 | |
---|
104 | [{'core_radius': 60.0, |
---|
105 | 's_thickness': 10.0, |
---|
106 | 'w_thickness': 10.0, |
---|
107 | 'core_sld': 6.4, |
---|
108 | 'shell_sld': 0.4, |
---|
109 | 'n_pairs': 2.0, |
---|
110 | 'scale': 1.0, |
---|
111 | 'background': 0.001, |
---|
112 | }, (0.001, 0.30903), 1.61873], |
---|
113 | ] |
---|