[c6ca41e] | 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 | |
---|
[d7028dc] | 31 | For information about polarised and magnetic scattering, see |
---|
| 32 | the :doc:`magnetic help <../sasgui/perspectives/fitting/mag_help>` documentation. |
---|
[c6ca41e] | 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 | tests = [ |
---|
| 98 | # Accuracy tests based on content in test/utest_other_models.py |
---|
| 99 | [{'radius': 60.0, |
---|
| 100 | 'thick_shell': 10.0, |
---|
| 101 | 'thick_solvent': 10.0, |
---|
| 102 | 'sld_solvent': 6.4, |
---|
| 103 | 'sld': 0.4, |
---|
| 104 | 'n_pairs': 2.0, |
---|
| 105 | 'scale': 1.0, |
---|
| 106 | 'background': 0.001, |
---|
| 107 | }, 0.001, 122.1405], |
---|
| 108 | |
---|
| 109 | [{'volfraction': 1.0, |
---|
| 110 | 'radius': 60.0, |
---|
| 111 | 'thick_shell': 10.0, |
---|
| 112 | 'thick_solvent': 10.0, |
---|
| 113 | 'sld_solvent': 6.4, |
---|
| 114 | 'sld': 0.4, |
---|
| 115 | 'n_pairs': 2.0, |
---|
| 116 | 'scale': 1.0, |
---|
| 117 | 'background': 0.001, |
---|
| 118 | }, (0.001, 0.30903), 1.61873], |
---|
| 119 | ] |
---|