[c9f885e] | 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 | |
---|
[d51ea74] | 6 | For information about polarised and magnetic scattering, click here_. |
---|
| 7 | |
---|
| 8 | .. _here: polar_mag_help.html |
---|
| 9 | |
---|
[c9f885e] | 10 | Definition |
---|
| 11 | ---------- |
---|
| 12 | |
---|
[d51ea74] | 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 | |
---|
[c9f885e] | 21 | .. figure:: img/multi_shell_fig1.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 | .. figure:: img/multi_shell_1d.jpg |
---|
| 37 | |
---|
| 38 | 1D plot using the default values (with 200 data point). |
---|
| 39 | |
---|
| 40 | Our model uses the form factor calculations implemented in a c-library provided |
---|
| 41 | by the NIST Center for Neutron Research (Kline, 2006). |
---|
| 42 | |
---|
| 43 | Reference |
---|
| 44 | --------- |
---|
| 45 | B Cabane, *Small Angle Scattering Methods*, |
---|
| 46 | in *Surfactant Solutions: New Methods of Investigation*, |
---|
| 47 | Ch.2, Surfactant Science Series Vol. 22, Ed. R Zana and M Dekker, |
---|
| 48 | New York, (1987). |
---|
| 49 | |
---|
| 50 | """ |
---|
| 51 | |
---|
| 52 | from numpy import inf |
---|
| 53 | |
---|
| 54 | name = "multi_shell" |
---|
| 55 | title = "Multi shell model" |
---|
| 56 | description = """ |
---|
| 57 | MultiShell (Sphere) Model (or Multilamellar Vesicles): Model parameters; |
---|
| 58 | scale : scale factor |
---|
| 59 | core_radius : Core radius of the multishell |
---|
| 60 | s_thickness: shell thickness |
---|
| 61 | w_thickness: water thickness |
---|
| 62 | core_sld: core scattering length density |
---|
| 63 | shell_sld: shell scattering length density |
---|
| 64 | n_pairs:number of pairs of water/shell |
---|
| 65 | background: incoherent background |
---|
| 66 | """ |
---|
| 67 | category = "shape:sphere" |
---|
| 68 | |
---|
| 69 | # pylint: disable=bad-whitespace, line-too-long |
---|
| 70 | # ["name", "units", default, [lower, upper], "type","description"], |
---|
| 71 | parameters = [ |
---|
| 72 | ["core_radius", "Ang", 60.0, [0.0, inf], "", "Core radius of the multishell"], |
---|
| 73 | ["s_thickness", "Ang", 10.0, [0.0, inf], "", "Shell thickness"], |
---|
| 74 | ["w_thickness", "Ang", 10.0, [0.0, inf], "", "Water thickness"], |
---|
| 75 | ["core_sld", "1e-6/Ang^2", 6.4, [-inf, inf], "", "Core scattering length density"], |
---|
| 76 | ["shell_sld", "1e-6/Ang^2", 0.4, [-inf, inf], "", "Shell scattering length density"], |
---|
| 77 | ["n_pairs", "", 2.0, [1.0, inf], "", "Number of pairs of water and shell"], |
---|
| 78 | ] |
---|
| 79 | # pylint: enable=bad-whitespace, line-too-long |
---|
| 80 | |
---|
[b7529e2] | 81 | source = ["lib/sph_j1c.c", "multi_shell.c"] |
---|
| 82 | |
---|
| 83 | polydispersity = ["core_radius", "n_pairs"] |
---|
[c9f885e] | 84 | |
---|
| 85 | demo = dict(scale=1, background=0, |
---|
| 86 | core_radius=60.0, |
---|
| 87 | s_thickness=10.0, |
---|
| 88 | w_thickness=10.0, |
---|
| 89 | core_sld=6.4, |
---|
| 90 | shell_sld=0.4, |
---|
| 91 | n_pairs=2.0) |
---|
| 92 | |
---|
| 93 | oldname = 'MultiShellModel' |
---|
| 94 | oldpars = dict() |
---|
| 95 | |
---|
| 96 | tests = [ |
---|
| 97 | # Accuracy tests based on content in test/utest_other_models.py |
---|
| 98 | [{'core_radius': 60.0, |
---|
| 99 | 's_thickness': 10.0, |
---|
| 100 | 'w_thickness': 10.0, |
---|
| 101 | 'core_sld': 6.4, |
---|
| 102 | 'shell_sld': 0.4, |
---|
| 103 | 'n_pairs': 2.0, |
---|
| 104 | 'scale': 1.0, |
---|
| 105 | 'background': 0.001, |
---|
| 106 | }, 0.001, 2442.81], |
---|
| 107 | |
---|
| 108 | [{'core_radius': 60.0, |
---|
| 109 | 's_thickness': 10.0, |
---|
| 110 | 'w_thickness': 10.0, |
---|
| 111 | 'core_sld': 6.4, |
---|
| 112 | 'shell_sld': 0.4, |
---|
| 113 | 'n_pairs': 2.0, |
---|
| 114 | 'scale': 1.0, |
---|
| 115 | 'background': 0.001, |
---|
| 116 | }, (0.001, 0.30903), 1.61873], |
---|
| 117 | ] |
---|