Changeset f64b154 in sasmodels
- Timestamp:
- Apr 2, 2019 6:12:24 AM (6 years ago)
- Branches:
- master
- Parents:
- 3448301 (diff), b955dd5 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - git-author:
- Steve K <smk78@…> (04/02/19 06:12:24)
- git-committer:
- GitHub <noreply@…> (04/02/19 06:12:24)
- Files:
-
- 5 added
- 86 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/conf.py
r30b60d2 rf8060c5 34 34 #'sphinx.ext.pngmath', 35 35 'sphinx.ext.mathjax', 36 #'only_directives',37 36 #'matplotlib.sphinxext.mathmpl', 38 'matplotlib.sphinxext.only_directives',39 37 'matplotlib.sphinxext.plot_directive', 40 38 'dollarmath', -
doc/genmodel.py
rb866abf rbe0942c 7 7 import matplotlib.pyplot as plt 8 8 sys.path.insert(0, os.path.abspath('..')) 9 import sasmodels 9 10 from sasmodels import generate, core 10 11 from sasmodels.direct_model import DirectModel, call_profile … … 127 128 #print("figure saved in",path) 128 129 130 def copy_if_newer(src, dst): 131 from os.path import dirname, exists, getmtime 132 import shutil 133 if not exists(dst): 134 path = dirname(dst) 135 if not exists(path): 136 os.makedirs(path) 137 shutil.copy2(src, dst) 138 elif getmtime(src) > getmtime(dst): 139 shutil.copy2(src, dst) 140 141 def link_sources(model_info): 142 from os.path import basename, dirname, realpath, join as joinpath 143 144 # List source files in reverse order of dependency. 145 model_file = basename(model_info.filename) 146 sources = list(reversed(model_info.source + [model_file])) 147 148 # Copy files to src dir under models directory. Need to do this 149 # because sphinx can't link to an absolute path. 150 root = dirname(dirname(realpath(__file__))) 151 src = joinpath(root, "sasmodels", "models") 152 dst = joinpath(root, "doc", "model", "src") 153 for path in sources: 154 copy_if_newer(joinpath(src, path), joinpath(dst, path)) 155 156 # Link to local copy of the files 157 downloads = [":download:`%s <src/%s>`"%(path, path) for path in sources] 158 159 # Could do syntax highlighting on the model files by creating a rst file 160 # beside each source file named containing source file with 161 # 162 # src/path.rst: 163 # 164 # .. {{ path.replace('/','_') }}: 165 # 166 # .. literalinclude:: {{ src/path }} 167 # :language: {{ "python" if path.endswith('.py') else "c" }} 168 # :linenos: 169 # 170 # and link to it using 171 # 172 # colors = [":ref:`%s`"%(path.replace('/','_')) for path in sources] 173 # 174 # Probably need to dump all the rst files into an index.rst to build them. 175 176 # Link to github repo (either the tagged sasmodels version or master) 177 url = "https://github.com/SasView/sasmodels/blob/v%s"%sasmodels.__version__ 178 #url = "https://github.com/SasView/sasmodels/blob/master"%sasmodels.__version__ 179 links = ["`%s <%s/sasmodels/models/%s>`_"%(path, url, path) for path in sources] 180 181 sep = "\n$\\ \\star\\ $ " # bullet 182 body = "\n**Source**\n" 183 #body += "\n" + sep.join(links) + "\n\n" 184 body += "\n" + sep.join(downloads) + "\n\n" 185 return body 186 129 187 def gen_docs(model_info): 130 188 # type: (ModelInfo) -> None … … 150 208 match = re.search(pattern, docstr.upper()) 151 209 210 sources = link_sources(model_info) 211 212 insertion = captionstr + sources 213 152 214 if match: 153 215 docstr1 = docstr[:match.start()] 154 216 docstr2 = docstr[match.start():] 155 docstr = docstr1 + captionstr+ docstr2217 docstr = docstr1 + insertion + docstr2 156 218 else: 157 219 print('------------------------------------------------------------------') 158 220 print('References NOT FOUND for model: ', model_info.id) 159 221 print('------------------------------------------------------------------') 160 docstr += captionstr161 162 open(sys.argv[2], 'w').write(docstr)222 docstr += insertion 223 224 open(sys.argv[2], 'w').write(docstr) 163 225 164 226 def process_model(path): -
doc/guide/fitting_sq.rst
r3448301 rf64b154 90 90 later. 91 91 92 **radius_effective_mode*:92 *radius_effective_mode*: 93 93 94 94 Defines how the effective radius (parameter **radius_effective**) should -
doc/index.rst
r8ae8532 rb955dd5 16 16 polydispersity and orientational dispersion. 17 17 18 .. htmlonly:: 18 .. only:: html 19 19 20 :Release: |version| 20 21 :Date: |today| … … 23 24 24 25 .. toctree:: 25 :numbered:26 26 :maxdepth: 4 27 27 … … 37 37 * :ref:`modindex` 38 38 39 .. htmlonly:: 39 .. only:: html 40 40 41 * :ref:`search` -
sasmodels/modelinfo.py
ra34b811 rb955dd5 292 292 Control parameters are used for variant models such as :ref:`rpa` which 293 293 have different cases with different parameters, as well as models 294 like :ref:`spherical_sld`with its user defined number of shells.294 like *spherical_sld* with its user defined number of shells. 295 295 The control parameter should appear in the parameter table along with the 296 296 parameters it is is controlling. For variant models, use *[CASES]* in … … 957 957 structure_factor = None # type: bool 958 958 #: True if the model defines an Fq function with signature 959 #: void Fq(double q, double *F1, double *F2, ...)959 #: ``void Fq(double q, double *F1, double *F2, ...)`` 960 960 have_Fq = False 961 961 #: List of options for computing the effective radius of the shape, -
sasmodels/models/_spherepy.py
ra34b811 rd57b06c 39 39 John Wiley and Sons, New York, (1955) 40 40 41 Source42 ------43 44 `_spherepy.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/_spherepy.py>`_45 `sphere.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/sphere.c>`_46 47 41 Authorship and Verification 48 42 ---------------------------- … … 51 45 * **Last Modified by:** 52 46 * **Last Reviewed by:** S King and P Parker **Date:** 2013/09/09 and 2014/01/06 53 * **Source added by :** Steve King **Date:** March 25, 201954 47 """ 55 48 -
sasmodels/models/adsorbed_layer.py
r0507e09 rc1e44e5 49 49 Layers*, *Macromol. Symp.*, 190 (2002) 33-42. 50 50 51 Source52 ------53 54 `adsorbed_layer.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/adsorbed_layer.py>`_55 56 51 Authorship and Verification 57 52 ---------------------------- … … 60 55 * **Last Modified by:** Paul Kienzle **Date:** April 14, 2016 61 56 * **Last Reviewed by:** Steve King **Date:** March 18, 2016 62 * **Source added by :** Steve King **Date:** March 25, 201963 57 """ 64 58 -
sasmodels/models/barbell.py
ra34b811 rd57b06c 81 81 .. [#] L. Onsager, *Ann. New York Acad. Sci.*, 51 (1949) 627-659 82 82 83 Source84 ------85 86 `barbell.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/barbell.py>`_87 88 `barbell.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/barbell.c>`_89 90 83 Authorship and Verification 91 84 ---------------------------- … … 94 87 * **Last Modified by:** Paul Butler **Date:** March 20, 2016 95 88 * **Last Reviewed by:** Richard Heenan **Date:** January 4, 2017 96 * **Source added by :** Steve King **Date:** March 25, 201997 89 """ 98 90 -
sasmodels/models/bcc_paracrystal.py
r0507e09 rc1e44e5 100 100 (Corrections to FCC and BCC lattice structure calculation) 101 101 102 Source103 ------104 105 `bcc_paracrystal.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/bcc_paracrystal.py>`_106 107 `bcc_paracrystal.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/bcc_paracrystal.c>`_108 109 102 Authorship and Verification 110 103 --------------------------- … … 113 106 * **Last Modified by:** Paul Butler **Date:** September 29, 2016 114 107 * **Last Reviewed by:** Richard Heenan **Date:** March 21, 2016 115 * **Source added by :** Steve King **Date:** March 25, 2019116 108 """ 117 109 -
sasmodels/models/be_polyelectrolyte.py
r0507e09 rc1e44e5 91 91 .. [#] E Raphael, J F Joanny, *Europhysics Letters*, 11 (1990) 179 92 92 93 Source94 ------95 96 `be_polyelectrolyte.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/be_polyelectrolyte.py>`_97 98 93 Authorship and Verification 99 94 ---------------------------- … … 102 97 * **Last Modified by:** Paul Butler **Date:** September 25, 2018 103 98 * **Last Reviewed by:** Paul Butler **Date:** September 25, 2018 104 * **Source added by :** Steve King **Date:** March 25, 2019105 99 """ 106 100 -
sasmodels/models/binary_hard_sphere.py
r0507e09 rc1e44e5 65 65 .. [#] S R Kline, *J Appl. Cryst.*, 39 (2006) 895 66 66 67 Source68 ------69 70 `binary_hard_sphere.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/binary_hard_sphere.py>`_71 72 `binary_hard_sphere.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/binary_hard_sphere.c>`_73 74 67 Authorship and Verification 75 68 ---------------------------- … … 78 71 * **Last Modified by:** Paul Butler **Date:** March 20, 2016 79 72 * **Last Reviewed by:** Paul Butler **Date:** March 20, 2016 80 * **Source added by :** Steve King **Date:** March 25, 201981 73 """ 82 74 -
sasmodels/models/broad_peak.py
r0507e09 rc1e44e5 33 33 None. 34 34 35 Source36 ------37 38 `broad_peak.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/broad_peak.py>`_39 40 35 Authorship and Verification 41 36 ---------------------------- … … 44 39 * **Last Modified by:** Paul kienle **Date:** July 24, 2016 45 40 * **Last Reviewed by:** Richard Heenan **Date:** March 21, 2016 46 * **Source added by :** Steve King **Date:** March 25, 201947 41 """ 48 42 -
sasmodels/models/capped_cylinder.py
ra34b811 rd57b06c 84 84 .. [#] L. Onsager, *Ann. New York Acad. Sci.*, 51 (1949) 627-659 85 85 86 Source87 ------88 89 `capped_cylinder.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/capped_cylinder.py>`_90 91 `capped_cylinder.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/capped_cylinder.c>`_92 93 86 Authorship and Verification 94 87 ---------------------------- … … 97 90 * **Last Modified by:** Paul Butler **Date:** September 30, 2016 98 91 * **Last Reviewed by:** Richard Heenan **Date:** January 4, 2017 99 * **Source added by :** Steve King **Date:** March 25, 2019100 92 """ 101 93 -
sasmodels/models/core_multi_shell.py
ra34b811 rd57b06c 39 39 Neutron Scattering*, Plenum Press, New York, 1987. 40 40 41 Source42 ------43 44 `core_multi_shell.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/core_multi_shell.py>`_45 46 `core_multi_shell.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/core_multi_shell.c>`_47 48 41 Authorship and Verification 49 42 ---------------------------- … … 52 45 * **Last Modified by:** Paul Kienzle **Date:** September 12, 2016 53 46 * **Last Reviewed by:** Paul Kienzle **Date:** September 12, 2016 54 * **Source added by :** Steve King **Date:** March 25, 201955 47 """ 56 48 from __future__ import division -
sasmodels/models/core_shell_bicelle.py
ra34b811 rd57b06c 92 92 .. [#] L. Onsager, *Ann. New York Acad. Sci.*, 51 (1949) 627-659 93 93 94 Source95 ------96 97 `core_shell_bicelle.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/core_shell_bicelle.py>`_98 99 `core_shell_bicelle.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/core_shell_bicelle.c>`_100 101 94 Authorship and Verification 102 95 ---------------------------- … … 105 98 * **Last Modified by:** Paul Butler **Date:** September 30, 2016 106 99 * **Last Reviewed by:** Richard Heenan **Date:** January 4, 2017 107 * **Source added by :** Steve King **Date:** March 25, 2019108 100 """ 109 101 -
sasmodels/models/core_shell_bicelle_elliptical.py
ra34b811 rd57b06c 101 101 .. [#] L. Onsager, *Ann. New York Acad. Sci.*, 51 (1949) 627-659 102 102 103 Source104 ------105 106 `core_shell_bicelle_elliptical.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/core_shell_bicelle_elliptical.py>`_107 108 `core_shell_bicelle_elliptical.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/core_shell_bicelle_elliptical.c>`_109 110 103 Authorship and Verification 111 104 ---------------------------- … … 114 107 * **Last Modified by:** Richard Heenan **Date:** December 14, 2016 115 108 * **Last Reviewed by:** Paul Kienzle **Date:** Feb 28, 2018 116 * **Source added by :** Steve King **Date:** March 25, 2019117 109 """ 118 110 -
sasmodels/models/core_shell_bicelle_elliptical_belt_rough.py
ra34b811 rd57b06c 113 113 .. [#] L. Onsager, *Ann. New York Acad. Sci.*, 51 (1949) 627-659 114 114 115 Source116 ------117 118 `core_shell_bicelle_elliptical_belt_rough.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/core_shell_bicelle_elliptical_belt_rough.py>`_119 120 `core_shell_bicelle_elliptical_belt_rough.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/core_shell_bicelle_elliptical_belt_rough.c>`_121 122 115 Authorship and Verification 123 116 ---------------------------- … … 126 119 * **Last Modified by:** Richard Heenan new 2d orientation **Date:** October 5, 2017 127 120 * **Last Reviewed by:** Richard Heenan 2d calc seems agree with 1d **Date:** Nov 2, 2017 128 * **Source added by :** Steve King **Date:** March 25, 2019129 121 """ 130 122 -
sasmodels/models/core_shell_cylinder.py
rdb1d9d5 rd57b06c 72 72 .. [#] L. Onsager, *Ann. New York Acad. Sci.*, 51 (1949) 627-659 73 73 74 Source75 ------76 77 `core_shell_cylinder.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/core_shell_cylinder.py>`_78 79 `core_shell_cylinder.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/core_shell_cylinder.c>`_80 81 74 Authorship and Verification 82 75 ---------------------------- … … 85 78 * **Last Modified by:** Paul Kienzle **Date:** Aug 8, 2016 86 79 * **Last Reviewed by:** Richard Heenan **Date:** March 18, 2016 87 * **Source added by :** Steve King **Date:** March 25, 201988 80 """ 89 81 -
sasmodels/models/core_shell_ellipsoid.py
r830cf6b rd57b06c 97 97 .. [#] Berr, S. *J. Phys. Chem.*, 1987, 91, 4760 98 98 99 Source100 ------101 102 `core_shell_ellipsoid.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/core_shell_ellipsoid.py>`_103 104 `core_shell_ellipsoid.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/core_shell_ellipsoid.c>`_105 106 99 Authorship and Verification 107 100 ---------------------------- … … 110 103 * **Last Modified by:** Richard Heenan (reparametrised model) **Date:** 2015 111 104 * **Last Reviewed by:** Steve King **Date:** March 27, 2019 112 * **Source added by :** Steve King **Date:** March 25, 2019113 105 """ 114 106 -
sasmodels/models/core_shell_parallelepiped.py
ra34b811 rd57b06c 175 175 .. [#] L. Onsager, *Ann. New York Acad. Sci.*, 51 (1949) 627-659 176 176 177 Source178 ------179 180 `core_shell_parallelepiped.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/core_shell_parallelepiped.py>`_181 182 `core_shell_parallelepiped.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/core_shell_parallelepiped.c>`_183 184 177 Authorship and Verification 185 178 ---------------------------- … … 190 183 * **Last Reviewed by:** Paul Butler **Date:** May 24, 2018 - documentation 191 184 updated 192 * **Source added by :** Steve King **Date:** March 25, 2019193 185 """ 194 186 -
sasmodels/models/core_shell_sphere.py
ra34b811 rd57b06c 50 50 .. [#] A Guinier and G Fournet, *Small-Angle Scattering of X-Rays*, John Wiley and Sons, New York, (1955) 51 51 52 Source53 ------54 55 `core_shell_sphere.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/core_shell_sphere.py>`_56 57 `core_shell_sphere.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/core_shell_sphere.c>`_58 59 52 Authorship and Verification 60 53 ---------------------------- … … 63 56 * **Last Modified by:** 64 57 * **Last Reviewed by:** 65 * **Source added by :** Steve King **Date:** March 25, 201966 58 """ 67 59 -
sasmodels/models/correlation_length.py
r0507e09 rc1e44e5 32 32 .. [#] B Hammouda, D L Ho and S R Kline, Insight into Clustering in Poly(ethylene oxide) Solutions, Macromolecules, 37 (2004) 6932-6937 33 33 34 Source35 ------36 37 `correlation_length.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/correlation_length.py>`_38 39 34 Authorship and Verification 40 35 ---------------------------- 41 36 42 * **Author:** 43 * **Last Modified by:** 44 * **Last Reviewed by:** 45 * **Source added by :** Steve King **Date:** March 25, 2019 37 * **Author:** 38 * **Last Modified by:** 39 * **Last Reviewed by:** 46 40 """ 47 41 -
sasmodels/models/cylinder.py
ra34b811 rd57b06c 100 100 .. [#] L. Onsager, *Ann. New York Acad. Sci.*, 51 (1949) 627-659 101 101 102 Source103 ------104 105 `cylinder.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/cylinder.py>`_106 107 `cylinder.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/cylinder.c>`_108 109 102 Authorship and Verification 110 103 ---------------------------- … … 113 106 * **Last Modified by:** 114 107 * **Last Reviewed by:** 115 * **Source added by :** Steve King **Date:** March 25, 2019116 108 """ 117 109 -
sasmodels/models/ellipsoid.py
ra34b811 rd57b06c 109 109 .. [#] A. Isihara. *J. Chem. Phys.*, 18 (1950) 1446-1449 110 110 111 Source112 ------113 114 `ellipsoid.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/ellipsoid.py>`_115 116 `ellipsoid.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/ellipsoid.c>`_117 118 111 Authorship and Verification 119 112 ---------------------------- … … 122 115 * **Converted to sasmodels by:** Helen Park **Date:** July 9, 2014 123 116 * **Last Modified by:** Paul Kienzle **Date:** March 22, 2017 124 * **Source added by :** Steve King **Date:** March 25, 2019125 117 """ 126 118 from __future__ import division -
sasmodels/models/elliptical_cylinder.py
ra34b811 rd57b06c 89 89 .. [#] L. Onsager, *Ann. New York Acad. Sci.*, 51 (1949) 627-659 90 90 91 Source92 ------93 94 `elliptical_cylinder.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/elliptical_cylinder.py>`_95 96 `elliptical_cylinder.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/elliptical_cylinder.c>`_97 98 91 Authorship and Verification 99 92 ---------------------------- … … 102 95 * **Last Modified by:** 103 96 * **Last Reviewed by:** Richard Heenan - corrected equation in docs **Date:** December 21, 2016 104 * **Source added by :** Steve King **Date:** March 25, 2019105 97 """ 106 98 -
sasmodels/models/fcc_paracrystal.py
r0507e09 rc1e44e5 99 99 (Corrections to FCC and BCC lattice structure calculation) 100 100 101 Source102 ------103 104 `fcc_paracrystal.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/fcc_paracrystal.py>`_105 106 `fcc_paracrystal.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/fcc_paracrystal.c>`_107 108 101 Authorship and Verification 109 102 --------------------------- … … 112 105 * **Last Modified by:** Paul Butler **Date:** September 29, 2016 113 106 * **Last Reviewed by:** Richard Heenan **Date:** March 21, 2016 114 * **Source added by :** Steve King **Date:** March 25, 2019115 107 """ 116 108 -
sasmodels/models/flexible_cylinder.py
r830cf6b rd57b06c 95 95 .. [#] W R Chen, P D Butler and L J Magid, *Incorporating Intermicellar Interactions in the Fitting of SANS Data from Cationic Wormlike Micelles.* Langmuir, 22(15) 2006 6539-6548 96 96 97 Source98 ------99 100 `flexible_cylinder.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/flexible_cylinder.py>`_101 102 `flexible_cylinder.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/flexible_cylinder.c>`_103 104 `wrc_cyl.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/lib/wrc_cyl.c>`_105 106 97 Authorship and Verification 107 98 ---------------------------- … … 110 101 * **Last Modified by:** 111 102 * **Last Reviewed by:** Steve King **Date:** March 26, 2019 112 * **Source added by :** Steve King **Date:** March 25, 2019113 103 """ 114 104 -
sasmodels/models/flexible_cylinder_elliptical.py
rdb1d9d5 rc1e44e5 83 83 .. [#] W R Chen, P D Butler and L J Magid, *Incorporating Intermicellar Interactions in the Fitting of SANS Data from Cationic Wormlike Micelles.* Langmuir, 22(15) 2006 6539-6548 84 84 85 Source86 ------87 88 `flexible_cylinder_elliptical.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/flexible_cylinder_elliptical.py>`_89 90 `flexible_cylinder_elliptical.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/flexible_cylinder_elliptical.c>`_91 92 `wrc_cyl.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/lib/wrc_cyl.c>`_93 94 85 Authorship and Verification 95 86 ---------------------------- … … 98 89 * **Last Modified by:** Richard Heenan **Date:** December, 2016 99 90 * **Last Reviewed by:** Steve King **Date:** March 26, 2019 100 * **Source added by :** Steve King **Date:** March 25, 2019101 91 """ 102 92 -
sasmodels/models/fractal.py
r0507e09 rc1e44e5 46 46 .. [#] J Teixeira, *J. Appl. Cryst.*, 21 (1988) 781-785 47 47 48 Source49 ------50 51 `fractal.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/fractal.py>`_52 53 `fractal.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/fractal.c>`_54 55 48 Authorship and Verification 56 49 ---------------------------- … … 60 53 * **Last Modified by:** Paul Butler **Date:** March 12, 2017 61 54 * **Last Reviewed by:** Paul Butler **Date:** March 12, 2017 62 * **Source added by :** Steve King **Date:** March 25, 201963 55 """ 64 56 from __future__ import division -
sasmodels/models/fractal_core_shell.py
r0507e09 rc1e44e5 51 51 .. [#Kline] S R Kline, *J Appl. Cryst.*, 39 (2006) 895 52 52 53 Source54 ------55 56 `fractal_core_shell.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/fractal_core_shell.py>`_57 58 `fractal_core_shell.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/fractal_core_shell.c>`_59 60 53 Authorship and Verification 61 54 ---------------------------- … … 64 57 * **Last Modified by:** Paul Butler and Paul Kienzle **Date:** November 27, 2016 65 58 * **Last Reviewed by:** Paul Butler and Paul Kienzle **Date:** November 27, 2016 66 * **Source added by :** Steve King **Date:** March 25, 201967 59 """ 68 60 -
sasmodels/models/fuzzy_sphere.py
ra34b811 rd57b06c 53 53 .. [#] M Stieger, J. S Pedersen, P Lindner, W Richtering, *Langmuir*, 20 (2004) 7283-7292 54 54 55 Source56 ------57 58 `fuzzy_sphere.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/fuzzy_sphere.py>`_59 60 `fuzzy_sphere.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/fuzzy_sphere.c>`_61 62 55 Authorship and Verification 63 56 ---------------------------- … … 66 59 * **Last Modified by:** 67 60 * **Last Reviewed by:** 68 * **Source added by :** Steve King **Date:** March 25, 201969 61 """ 70 62 -
sasmodels/models/gauss_lorentz_gel.py
r0507e09 rc1e44e5 34 34 .. [#] G Evmenenko, E Theunissen, K Mortensen, H Reynaers, *Polymer*, 42 (2001) 2907-2913 35 35 36 Source37 ------38 39 `gauss_lorentz_gel.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/gauss_lorentz_gel.py>`_40 41 36 Authorship and Verification 42 37 ---------------------------- 43 38 44 * **Author:** 45 * **Last Modified by:** 46 * **Last Reviewed by:** 47 * **Source added by :** Steve King **Date:** March 25, 2019 39 * **Author:** 40 * **Last Modified by:** 41 * **Last Reviewed by:** 48 42 """ 49 43 -
sasmodels/models/gaussian_peak.py
r0507e09 rc1e44e5 27 27 None. 28 28 29 Source30 ------31 32 `gaussian_peak.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/gaussian_peak.py>`_33 34 29 Authorship and Verification 35 30 ---------------------------- 36 31 37 * **Author:** 38 * **Last Modified by:** 39 * **Last Reviewed by:** 40 * **Source added by :** Steve King **Date:** March 25, 2019 32 * **Author:** 33 * **Last Modified by:** 34 * **Last Reviewed by:** 41 35 """ 42 36 -
sasmodels/models/gel_fit.py
r0507e09 rc1e44e5 41 41 .. [#] Simon Mallam, Ferenc Horkay, Anne-Marie Hecht, Adrian R Rennie, Erik Geissler, *Macromolecules* 1991, 24, 543-548 42 42 43 Source44 ------45 46 `gel_fit.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/gel_fit.py>`_47 48 `gel_fit.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/gel_fit.c>`_49 50 43 Authorship and Verification 51 44 ---------------------------- 52 45 53 * **Author:** 54 * **Last Modified by:** 55 * **Last Reviewed by:** 56 * **Source added by :** Steve King **Date:** March 25, 2019 46 * **Author:** 47 * **Last Modified by:** 48 * **Last Reviewed by:** 57 49 """ 58 50 -
sasmodels/models/guinier.py
r0507e09 rc1e44e5 48 48 .. [#] A Guinier and G Fournet, *Small-Angle Scattering of X-Rays*, John Wiley & Sons, New York (1955) 49 49 50 Source51 ------52 53 `guinier.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/guinier.py>`_54 55 50 Authorship and Verification 56 51 ---------------------------- 57 52 58 * **Author:** 59 * **Last Modified by:** 60 * **Last Reviewed by:** 61 * **Source added by :** Steve King **Date:** March 25, 2019 53 * **Author:** 54 * **Last Modified by:** 55 * **Last Reviewed by:** 62 56 """ 63 57 -
sasmodels/models/guinier_porod.py
r7a5f8af rc1e44e5 63 63 .. [#] B Hammouda, *Analysis of the Beaucage model, J. Appl. Cryst.*, (2010), 43, 1474-1478 64 64 65 Source66 ------67 68 `guinier_porod.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/guinier_porod.py>`_69 70 65 Authorship and Verification 71 66 ---------------------------- 72 67 73 * **Author:** 74 * **Last Modified by:** 75 * **Last Reviewed by:** 76 * **Source added by :** Steve King **Date:** March 25, 2019 68 * **Author:** 69 * **Last Modified by:** 70 * **Last Reviewed by:** 77 71 """ 78 72 -
sasmodels/models/hardsphere.py
r4d00de6 r0d5dc05 54 54 .. [#] J K Percus, J Yevick, *J. Phys. Rev.*, 110, (1958) 1 55 55 56 Source57 ------58 59 `hardsphere.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/hardsphere.py>`_60 61 56 Authorship and Verification 62 57 ---------------------------- … … 65 60 * **Last Modified by:** 66 61 * **Last Reviewed by:** 67 * **Source added by :** Steve King **Date:** March 25, 201968 62 """ 69 63 -
sasmodels/models/hayter_msa.py
r4d00de6 r0d5dc05 63 63 .. [#] C G Malmberg and A A Maryott, *J. Res. Nat. Bureau Standards*, 56 (1956) 2641 64 64 65 Source66 ------67 68 `hayter_msa.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/hayter_msa.py>`_69 70 `hayter_msa.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/hayter_msa.c>`_71 72 65 Authorship and Verification 73 66 ---------------------------- … … 76 69 * **Last Modified by:** 77 70 * **Last Reviewed by:** Steve King **Date:** March 28, 2019 78 * **Source added by :** Steve King **Date:** March 25, 201979 71 """ 80 72 -
sasmodels/models/hollow_cylinder.py
ra34b811 rd57b06c 62 62 .. [#] L. Onsager, *Ann. New York Acad. Sci.*, 51 (1949) 627-659 63 63 64 Source65 ------66 67 `hollow_cylinder.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/hollow_cylinder.py>`_68 69 `hollow_cylinder.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/hollow_cylinder.c>`_70 71 64 Authorship and Verification 72 65 ---------------------------- … … 76 69 (corrected VR calculation) 77 70 * **Last Reviewed by:** Paul Butler **Date:** September 06, 2018 78 * **Source added by :** Steve King **Date:** March 25, 201979 71 """ 80 72 from __future__ import division -
sasmodels/models/hollow_rectangular_prism.py
ra34b811 rd57b06c 100 100 .. [#] L. Onsager, *Ann. New York Acad. Sci.*, 51 (1949) 627-659 101 101 102 Source103 ------104 105 `hollow_rectangular_prism.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/hollow_rectangular_prism.py>`_106 107 `hollow_rectangular_prism.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/hollow_rectangular_prism.c>`_108 109 102 Authorship and Verification 110 103 ---------------------------- … … 113 106 * **Last Modified by:** Paul Kienzle **Date:** December 14, 2017 114 107 * **Last Reviewed by:** Paul Butler **Date:** September 06, 2018 115 * **Source added by :** Steve King **Date:** March 25, 2019116 108 """ 117 109 -
sasmodels/models/hollow_rectangular_prism_thin_walls.py
ra34b811 rd57b06c 74 74 .. [#] L. Onsager, *Ann. New York Acad. Sci.*, 51 (1949) 627-659 75 75 76 Source77 ------78 79 `hollow_rectangular_prism_thin_walls.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/hollow_rectangular_prism_thin_walls.py>`_80 81 `hollow_rectangular_prism_thin_walls.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/hollow_rectangular_prism_thin_walls.c>`_82 83 76 Authorship and Verification 84 77 ---------------------------- … … 87 80 * **Last Modified by:** Paul Kienzle **Date:** October 15, 2016 88 81 * **Last Reviewed by:** Paul Butler **Date:** September 07, 2018 89 * **Source added by :** Steve King **Date:** March 25, 201990 82 """ 91 83 -
sasmodels/models/lamellar.py
r0507e09 rc1e44e5 43 43 .. [#] J Berghausen, J Zipfel, P Lindner, W Richtering, *J. Phys. Chem. B*, 105, (2001) 11081-11088 44 44 45 Source46 ------47 48 `lamellar.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/lamellar.py>`_49 50 45 Authorship and Verification 51 46 ---------------------------- 52 47 53 * **Author:** 54 * **Last Modified by:** 55 * **Last Reviewed by:** 56 * **Source added by :** Steve King **Date:** March 25, 2019 48 * **Author:** 49 * **Last Modified by:** 50 * **Last Reviewed by:** 57 51 """ 58 52 -
sasmodels/models/lamellar_hg.py
r0507e09 rc1e44e5 45 45 .. [#] J Berghausen, J Zipfel, P Lindner, W Richtering, *J. Phys. Chem. B*, 105, (2001) 11081-11088 46 46 47 Source48 ------49 50 `lamellar_hg.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/lamellar_hg.py>`_51 52 47 Authorship and Verification 53 48 ---------------------------- 54 49 55 * **Author:** 56 * **Last Modified by:** 50 * **Author:** 51 * **Last Modified by:** 57 52 * **Last Reviewed by:** S King and P Butler **Date** April 17, 2014 58 * **Source added by :** Steve King **Date:** March 25, 201959 53 """ 60 54 -
sasmodels/models/lamellar_hg_stack_caille.py
r0507e09 rc1e44e5 72 72 .. [#] J Berghausen, J Zipfel, P Lindner, W Richtering, *J. Phys. Chem. B*, 105, (2001) 11081-11088 73 73 74 Source75 ------76 77 `lamellar_hg_stack_caille.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/lamellar_hg_stack_caille.py>`_78 79 `lamellar_hg_stack_caille.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/lamellar_hg_stack_caille.c>`_80 81 74 Authorship and Verification 82 75 ---------------------------- 83 76 84 * **Author:** 85 * **Last Modified by:** 86 * **Last Reviewed by:** 87 * **Source added by :** Steve King **Date:** March 25, 2019 77 * **Author:** 78 * **Last Modified by:** 79 * **Last Reviewed by:** 88 80 """ 89 81 -
sasmodels/models/lamellar_stack_caille.py
r0507e09 rc1e44e5 68 68 .. [#] J Berghausen, J Zipfel, P Lindner, W Richtering, *J. Phys. Chem. B*, 105, (2001) 11081-11088 69 69 70 Source71 ------72 73 `lamellar_stack_caille.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/lamellar_stack_caille.py>`_74 75 `lamellar_stack_caille.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/lamellar_stack_caille.c>`_76 77 70 Authorship and Verification 78 71 ---------------------------- 79 72 80 * **Author:** 81 * **Last Modified by:** 82 * **Last Reviewed by:** 83 * **Source added by :** Steve King **Date:** March 25, 2019 73 * **Author:** 74 * **Last Modified by:** 75 * **Last Reviewed by:** 84 76 """ 85 77 -
sasmodels/models/lamellar_stack_paracrystal.py
r0507e09 rc1e44e5 90 90 .. [#] M Bergstrom, J S Pedersen, P Schurtenberger, S U Egelhaaf, *J. Phys. Chem. B*, 103 (1999) 9888-9897 91 91 92 Source93 ------94 95 `lamellar_stack_paracrystal.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/lamellar_stack_paracrystal.py>`_96 97 `lamellar_stack_paracrystal.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/lamellar_stack_paracrystal.c>`_98 99 92 Authorship and Verification 100 93 ---------------------------- 101 94 102 * **Author:** 103 * **Last Modified by:** 104 * **Last Reviewed by:** 105 * **Source added by :** Steve King **Date:** March 25, 2019 95 * **Author:** 96 * **Last Modified by:** 97 * **Last Reviewed by:** 106 98 """ 107 99 import numpy as np -
sasmodels/models/line.py
r0507e09 rc1e44e5 23 23 None. 24 24 25 Source26 ------27 28 `line.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/line.py>`_29 30 25 Authorship and Verification 31 26 ---------------------------- 32 27 33 * **Author:** 34 * **Last Modified by:** 35 * **Last Reviewed by:** 36 * **Source added by :** Steve King **Date:** March 25, 2019"""28 * **Author:** 29 * **Last Modified by:** 30 * **Last Reviewed by:** 31 """ 37 32 38 33 import numpy as np -
sasmodels/models/linear_pearls.py
r0507e09 rc1e44e5 31 31 .. [#] A V Dobrynin, M Rubinstein and S P Obukhov, *Macromol.*, 29 (1996) 2974-2979 32 32 33 Source34 ------35 36 `linear_pearls.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/linear_pearls.py>`_37 38 `linear_pearls.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/linear_pearls.c>`_39 40 33 Authorship and Verification 41 34 ---------------------------- 42 35 43 * **Author:** 44 * **Last Modified by:** 45 * **Last Reviewed by:** 46 * **Source added by :** Steve King **Date:** March 25, 2019"""36 * **Author:** 37 * **Last Modified by:** 38 * **Last Reviewed by:** 39 """ 47 40 48 41 import numpy as np -
sasmodels/models/lorentz.py
r0507e09 rc1e44e5 22 22 .. [#] L.S. Qrnstein and F. Zernike, *Proc. Acad. Sci. Amsterdam* 17, 793 (1914), and *Z. Phys.* 19, 134 (1918), and 27, 761 {1926); referred to as QZ. 23 23 24 Source25 ------26 27 `lorentz.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/lorentz.py>`_28 29 24 Authorship and Verification 30 25 ---------------------------- 31 26 32 * **Author:** 33 * **Last Modified by:** 34 * **Last Reviewed by:** 35 * **Source added by :** Steve King **Date:** March 25, 2019"""27 * **Author:** 28 * **Last Modified by:** 29 * **Last Reviewed by:** 30 """ 36 31 37 32 import numpy as np -
sasmodels/models/mass_fractal.py
r0507e09 rc1e44e5 51 51 .. [#] D Mildner and P Hall, *J. Phys. D: Appl. Phys.*, 19 (1986) 1535-1545 Equation(9) 52 52 53 Source54 ------55 56 `mass_fractal.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/mass_fractal.py>`_57 58 `mass_fractal.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/mass_fractal.c>`_59 60 53 Authorship and Verification 61 54 ---------------------------- 62 55 63 * **Author:** 64 * **Last Modified by:** 65 * **Last Reviewed by:** 66 * **Source added by :** Steve King **Date:** March 25, 2019"""56 * **Author:** 57 * **Last Modified by:** 58 * **Last Reviewed by:** 59 """ 67 60 68 61 import numpy as np -
sasmodels/models/mass_surface_fractal.py
r0507e09 rc1e44e5 55 55 35 (1987) 2361-2364 Equation(2) 56 56 57 Source58 ------59 60 `mass_surface_fractal.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/mass_surface_fractal.py>`_61 62 `mass_surface_fractal.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/mass_surface_fractal.c>`_63 64 57 Authorship and Verification 65 58 ---------------------------- 66 59 67 60 * **Author:** Piotr Rozyczko **Date:** Jan 20, 2016 68 * **Last Modified by:** 61 * **Last Modified by:** 69 62 * **Last Reviewed by:** Richard Heenan **Date:** May 30, 2018 70 * **Source added by :** Steve King **Date:** March 25, 201971 63 """ 72 64 -
sasmodels/models/mono_gauss_coil.py
ra34b811 rd57b06c 49 49 .. [#] http://www.ncnr.nist.gov/staff/hammouda/distance_learning/chapter_28.pdf 50 50 51 Source52 ------53 54 `mono_gauss_coil.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/mono_gauss_coil.py>`_55 56 `mono_gauss_coil.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/mono_gauss_coil.c>`_57 58 51 Authorship and Verification 59 52 ---------------------------- … … 62 55 * **Last Modified by:** 63 56 * **Last Reviewed by:** 64 * **Source added by :** Steve King **Date:** March 25, 2019"""57 """ 65 58 66 59 import numpy as np -
sasmodels/models/multilayer_vesicle.py
rdb1d9d5 rd57b06c 100 100 R Zana and M Dekker, New York, (1987). 101 101 102 Source103 ------104 105 `multilayer_vesicle.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/multilayer_vesicle.py>`_106 107 `multilayer_vesicle.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/multilayer_vesicle.c>`_108 109 102 Authorship and Verification 110 103 ---------------------------- … … 114 107 * **Last Modified by:** Paul Kienzle **Date:** Feb 7, 2017 115 108 * **Last Reviewed by:** Steve King **Date:** March 28, 2019 116 * **Source added by :** Steve King **Date:** March 25, 2019117 109 """ 118 110 -
sasmodels/models/onion.py
rdb1d9d5 rd57b06c 187 187 .. [#] L A Feigin and D I Svergun, *Structure Analysis by Small-Angle X-Ray and Neutron Scattering*, Plenum Press, New York, 1987. 188 188 189 Source190 ------191 192 `onion.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/onion.py>`_193 194 `onion.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/onion.c>`_195 196 189 Authorship and Verification 197 190 ---------------------------- … … 200 193 * **Last Modified by:** 201 194 * **Last Reviewed by:** Steve King **Date:** March 28, 2019 202 * **Source added by :** Steve King **Date:** March 25, 2019203 195 """ 204 196 -
sasmodels/models/parallelepiped.py
ra34b811 rd57b06c 182 182 .. [#] L. Onsager, *Ann. New York Acad. Sci.*, 51 (1949) 627-659 183 183 184 Source185 ------186 187 `parallelepiped.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/parallelepiped.py>`_188 189 `parallelepiped.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/parallelepiped.c>`_190 191 184 Authorship and Verification 192 185 ---------------------------- … … 196 189 * **Last Reviewed by:** Miguel Gonzales and Paul Butler **Date:** May 24, 197 190 2018 - documentation updated 198 * **Source added by :** Steve King **Date:** March 25, 2019199 191 """ 200 192 -
sasmodels/models/peak_lorentz.py
r0507e09 rc1e44e5 27 27 None. 28 28 29 Source30 ------31 32 `peak_lorentz.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/peak_lorentz.py>`_33 34 `peak_lorentz.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/peak_lorentz.c>`_35 36 29 Authorship and Verification 37 30 ---------------------------- 38 31 39 * **Author:** 40 * **Last Modified by:** 41 * **Last Reviewed by:** 42 * **Source added by :** Steve King **Date:** March 25, 2019 32 * **Author:** 33 * **Last Modified by:** 34 * **Last Reviewed by:** 43 35 """ 44 36 -
sasmodels/models/pearl_necklace.py
rdb1d9d5 rd57b06c 55 55 .. [#] L. Onsager, *Ann. New York Acad. Sci.*, 51 (1949) 627-659 56 56 57 Source58 ------59 60 `pearl_necklace.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/pearl_necklace.py>`_61 62 `pearl_necklace.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/pearl_necklace.c>`_63 64 57 Authorship and Verification 65 58 ---------------------------- … … 68 61 * **Last Modified by:** Andrew Jackson **Date:** March 28, 2019 69 62 * **Last Reviewed by:** Steve King **Date:** March 28, 2019 70 * **Source added by :** Steve King **Date:** March 25, 201971 63 """ 72 64 -
sasmodels/models/poly_gauss_coil.py
ra34b811 rc1e44e5 48 48 .. [#] http://www.ncnr.nist.gov/staff/hammouda/distance_learning/chapter_28.pdf 49 49 50 Source51 ------52 53 `poly_gauss_coil.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/poly_gauss_coil.py>`_54 55 `poly_gauss_coil.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/poly_gauss_coil.c>`_56 57 50 Authorship and Verification 58 51 ---------------------------- … … 61 54 * **Last Modified by:** 62 55 * **Last Reviewed by:** 63 * **Source added by :** Steve King **Date:** March 25, 201964 56 """ 65 57 -
sasmodels/models/polymer_excl_volume.py
r0507e09 rc1e44e5 113 113 .. [#] B Hammouda & M-H Kim, *The empirical core-chain model* 247 (2017) 434-440 114 114 115 Source116 ------117 118 `polymer_excl_volume.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/polymer_excl_volume.py>`_119 120 `polymer_excl_volume.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/polymer_excl_volume.c>`_121 122 115 Authorship and Verification 123 116 ---------------------------- 124 117 125 * **Author:** 126 * **Last Modified by:** 127 * **Last Reviewed by:** 128 * **Source added by :** Steve King **Date:** March 25, 2019 118 * **Author:** 119 * **Last Modified by:** 120 * **Last Reviewed by:** 129 121 """ 130 122 -
sasmodels/models/polymer_micelle.py
r0507e09 rc1e44e5 70 70 .. [#] J Pedersen, *J. Appl. Cryst.*, 33 (2000) 637-640 71 71 72 Source73 ------74 75 `polymer_micelle.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/polymer_micelle.py>`_76 77 `polymer_micelle.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/polymer_micelle.c>`_78 79 72 Authorship and Verification 80 73 ---------------------------- … … 83 76 * **Last modified by:** Paul Kienzle **Date:** November 29, 2017 84 77 * **Last reviewed by:** Steve King **Date:** November 30, 2017 85 * **Source added by :** Steve King **Date:** March 25, 201986 78 """ 87 79 -
sasmodels/models/porod.py
r0507e09 rc1e44e5 21 21 .. [#] L A Feigin, D I Svergun, G W Taylor. *Structure Analysis by Small-Angle X-ray and Neutron Scattering*. Springer. (1987) 22 22 23 Source24 ------25 26 `porod.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/porod.py>`_27 28 23 Authorship and Verification 29 24 ---------------------------- 30 25 31 * **Author:** 32 * **Last Modified by:** 33 * **Last Reviewed by:** 34 * **Source added by :** Steve King **Date:** March 25, 2019 26 * **Author:** 27 * **Last Modified by:** 28 * **Last Reviewed by:** 35 29 """ 36 30 -
sasmodels/models/power_law.py
r0507e09 rc1e44e5 26 26 None. 27 27 28 Source29 ------30 31 `power_law.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/power_law.py>`_32 33 28 Authorship and Verification 34 29 ---------------------------- 35 30 36 * **Author:** 37 * **Last Modified by:** 38 * **Last Reviewed by:** 39 * **Source added by :** Steve King **Date:** March 25, 2019 31 * **Author:** 32 * **Last Modified by:** 33 * **Last Reviewed by:** 40 34 """ 41 35 -
sasmodels/models/pringle.py
ra34b811 rd57b06c 43 43 .. [#] L. Onsager, *Ann. New York Acad. Sci.*, 51 (1949) 627-659 44 44 45 Source46 ------47 48 `pringle.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/pringle.py>`_49 50 `pringle.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/pringle.c>`_51 52 45 Authorship and Verification 53 46 ---------------------------- … … 56 49 * **Last Modified by:** Wojciech Wpotrzebowski **Date:** March 20, 2016 57 50 * **Last Reviewed by:** Andrew Jackson **Date:** September 26, 2016 58 * **Source added by :** Steve King **Date:** March 25, 201959 51 """ 60 52 -
sasmodels/models/raspberry.py
ra34b811 rd57b06c 100 100 .. [#] K Larson-Smith, A Jackson, and D C Pozzo, *Small angle scattering model for Pickering emulsions and raspberry particles*, *Journal of Colloid and Interface Science*, 343(1) (2010) 36-41 101 101 102 Source103 ------104 105 `raspberry.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/raspberry.py>`_106 107 `raspberry.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/raspberry.c>`_108 109 102 Authorship and Verification 110 103 ---------------------------- … … 113 106 * **Last Modified by:** Andrew Jackson **Date:** March 20, 2016 114 107 * **Last Reviewed by:** Andrew Jackson **Date:** March 20, 2016 115 * **Source added by :** Steve King **Date:** March 25, 2019116 108 """ 117 109 -
sasmodels/models/rectangular_prism.py
ra34b811 rd57b06c 100 100 .. [#] L. Onsager, *Ann. New York Acad. Sci.*, 51 (1949) 627-659 101 101 102 Source103 ------104 105 `rectangular_prism.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/rectangular_prism.py>`_106 107 `rectangular_prism.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/rectangular_prism.c>`_108 109 102 Authorship and Verification 110 103 ---------------------------- … … 113 106 * **Last Modified by:** 114 107 * **Last Reviewed by:** 115 * **Source added by :** Steve King **Date:** March 25, 2019116 108 """ 117 109 -
sasmodels/models/rpa.py
rdb1d9d5 rc1e44e5 67 67 .. [#] B. Hammouda, *SANS Toolbox* https://www.ncnr.nist.gov/staff/hammouda/the_sans_toolbox.pdf. 68 68 69 Source70 ------71 72 `rpa.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/rpa.py>`_73 74 `rpa.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/rpa.c>`_75 76 69 Authorship and Verification 77 70 ---------------------------- … … 81 74 * **Last Modified by:** Paul Butler **Date:** March 12, 2017 82 75 * **Last Reviewed by:** Steve King **Date:** March 27, 2019 83 * **Source added by :** Steve King **Date:** March 25, 201984 76 """ 85 77 -
sasmodels/models/sc_paracrystal.py
r0507e09 rc1e44e5 101 101 .. [#CIT1990] Hideki Matsuoka et. al. *Physical Review B*, 41 (1990) 3854 -3856 (Corrections to FCC and BCC lattice structure calculation) 102 102 103 Source104 ------105 106 `sc_paracrystal.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/sc_paracrystal.py>`_107 108 `sc_paracrystal.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/sc_paracrystal.c>`_109 110 103 Authorship and Verification 111 104 --------------------------- … … 114 107 * **Last Modified by:** Steve King **Date:** March 25, 2019 115 108 * **Last Reviewed by:** Richard Heenan **Date:** March 21, 2016 116 * **Source added by :** Steve King **Date:** March 25, 2019117 109 """ 118 110 -
sasmodels/models/sphere.py
r934a001 rd57b06c 36 36 References 37 37 ---------- 38 38 39 39 .. [#] A Guinier and G. Fournet, *Small-Angle Scattering of X-Rays*, 40 40 John Wiley and Sons, New York, (1955) 41 42 Source43 ------44 45 `sphere.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/sphere.py>`_46 47 `sphere.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/sphere.c>`_48 41 49 42 Authorship and Verification … … 53 46 * **Last Modified by:** 54 47 * **Last Reviewed by:** S King and P Parker **Date:** 2013/09/09 and 2014/01/06 55 * **Source added by :** Steve King **Date:** March 25, 201956 48 """ 57 49 … … 93 85 #2345678901234567890123456789012345678901234567890123456789012345678901234567890 94 86 tests = [ 95 [{}, 0.2, 0.726362], # each test starts with default parameter values 87 [{}, 0.2, 0.726362], # each test starts with default parameter values 96 88 # inside { }, unless modified. Then Q and expected value of I(Q) 97 # putting None for an expected result will pass the test if there are no 89 # putting None for an expected result will pass the test if there are no 98 90 # errors from the routine, but without any check on the value of the result 99 91 [{"scale": 1., "background": 0., "sld": 6., "sld_solvent": 1., 100 "radius": 120.}, [0.01,0.1,0.2], 92 "radius": 120.}, [0.01,0.1,0.2], 101 93 [1.34836265e+04, 6.20114062e+00, 1.04733914e-01]], 102 94 [{"scale": 1., "background": 0., "sld": 6., "sld_solvent": 1., 103 # careful tests here R=120 Pd=.2, then with S(Q) at default Reff=50 95 # careful tests here R=120 Pd=.2, then with S(Q) at default Reff=50 104 96 # (but this gets changed to 120) phi=0,2 105 97 "radius": 120., "radius_pd": 0.2, "radius_pd_n":45}, 106 [0.01,0.1,0.2], [1.74395295e+04, 3.68016987e+00, 2.28843099e-01]], 98 [0.01,0.1,0.2], [1.74395295e+04, 3.68016987e+00, 2.28843099e-01]], 107 99 # a list of Q values and list of expected results is also possible 108 100 [{"scale": 1., "background": 0., "sld": 6., "sld_solvent": 1., 109 101 "radius": 120., "radius_pd": 0.2, "radius_pd_n":45}, 110 0.01, 335839.88055473, 1.41045057e+11, 120.0, 8087664.122641933, 1.0], 111 # the longer list here checks F1, F2, R_eff, volume, volume_ratio 102 0.01, 335839.88055473, 1.41045057e+11, 120.0, 8087664.122641933, 1.0], 103 # the longer list here checks F1, F2, R_eff, volume, volume_ratio 112 104 [{"radius": 120., "radius_pd": 0.2, "radius_pd_n":45}, 113 0.1, 482.93824329, 29763977.79867414, 120.0, 8087664.122641933, 1.0], 105 0.1, 482.93824329, 29763977.79867414, 120.0, 8087664.122641933, 1.0], 114 106 [{"radius": 120., "radius_pd": 0.2, "radius_pd_n":45}, 115 107 0.2, 1.23330406, 1850806.1197361, 120.0, 8087664.122641933, 1.0], 116 108 # But note P(Q) = F2/volume 117 # F and F^2 are "unscaled", with for n <F F*>S(q) or for beta approx 109 # F and F^2 are "unscaled", with for n <F F*>S(q) or for beta approx 118 110 # I(q) = n [<F F*> + <F><F*> (S(q) - 1)] 119 # for n the number density and <.> the orientation average, and 111 # for n the number density and <.> the orientation average, and 120 112 # F = integral rho(r) exp(i q . r) dr. 121 113 # The number density is volume fraction divided by particle volume. 122 # Effectively, this leaves F = V drho form, where form is the usual 114 # Effectively, this leaves F = V drho form, where form is the usual 123 115 # 3 j1(qr)/(qr) or whatever depending on the shape. 124 116 # @S RESULTS using F1 and F2 from the longer test strng above: … … 128 120 # with by default scale=1.0, background=0.001 129 121 # NOTE currently S(Q) volfraction is also included in scaling 130 # structure_factor_mode 0 = normal decoupling approx, 122 # structure_factor_mode 0 = normal decoupling approx, 131 123 # 1 = beta(Q) approx 132 # radius_effective_mode 0 is for free choice, 124 # radius_effective_mode 0 is for free choice, 133 125 # 1 is use radius from F2(Q) 134 126 # (sphere only has two choices, other models may have more) … … 136 128 "radius": 120., "radius_pd": 0.2, "radius_pd_n":45,"volfraction":0.2, 137 129 #"radius_effective":50.0, # hard sphere structure factor 138 "structure_factor_mode": 1, # mode 0 = normal decoupling approx, 130 "structure_factor_mode": 1, # mode 0 = normal decoupling approx, 139 131 # 1 = beta(Q) approx 140 "radius_effective_mode": 0 # this used default hardsphere Reff=50 132 "radius_effective_mode": 0 # this used default hardsphere Reff=50 141 133 }, [0.01,0.1,0.2], [1.32473756e+03, 7.36633631e-01, 4.67686201e-02] ], 142 134 [{"@S": "hardsphere", … … 145 137 "radius_effective":45.0, # explicit Reff over rides either 50 or 120 146 138 "structure_factor_mode": 1, # beta approx 147 "radius_effective_mode": 0 # 139 "radius_effective_mode": 0 # 148 140 }, 0.01, 1316.2990966463444 ], 149 141 [{"@S": "hardsphere", … … 152 144 "radius_effective":120.0, # over ride Reff 153 145 "structure_factor_mode": 1, # beta approx 154 "radius_effective_mode": 0 # (mode=1 here also uses 120) 146 "radius_effective_mode": 0 # (mode=1 here also uses 120) 155 147 }, [0.01,0.1,0.2], [1.57928589e+03, 7.37067923e-01, 4.67686197e-02 ]], 156 148 [{"@S": "hardsphere", -
sasmodels/models/spherical_sld.py
r627b68b rd57b06c 187 187 and Neutron Scattering, Plenum Press, New York, (1987) 188 188 189 Source190 ------191 192 `spherical_sld.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/spherical_sld.py>`_193 194 `spherical_sld.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/spherical_sld.c>`_195 196 189 Authorship and Verification 197 190 --------------------------- … … 200 193 * **Last Modified by:** Paul Kienzle **Date:** Dec 20, 2016 201 194 * **Last Reviewed by:** Steve King **Date:** March 29, 2019 202 * **Source added by :** Steve King **Date:** March 25, 2019203 195 """ 204 196 -
sasmodels/models/spinodal.py
r0507e09 rc1e44e5 44 44 .. [#] T. Hashimoto, M. Takenaka & H. Jinnai. Scattering Studies of Self-Assembling Processes of Polymer Blends in Spinodal Decomposition. J. Appl. Cryst. 24, 457-466 (1991). 45 45 46 Source47 ------48 49 `spinodal.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/spinodal.py>`_50 51 46 Authorship and Verification 52 47 ---------------------------- … … 55 50 * **Last Modified by:** Steve King **Date:** Oct 25, 2018 56 51 * **Last Reviewed by:** Steve King **Date:** Oct 25, 2018 57 * **Source added by :** Steve King **Date:** March 25, 201958 52 """ 59 53 -
sasmodels/models/squarewell.py
r4d00de6 r0d5dc05 54 54 .. [#] M Kotlarchyk and S-H Chen, *J. Chem. Phys.*, 79 (1983) 2461-2469 55 55 56 Source57 ------58 59 `squarewell.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/squarewell.py>`_60 61 56 Authorship and Verification 62 57 ---------------------------- … … 65 60 * **Last Modified by:** 66 61 * **Last Reviewed by:** Steve King **Date:** March 27, 2019 67 * **Source added by :** Steve King **Date:** March 25, 201968 62 """ 69 63 -
sasmodels/models/stacked_disks.py
r0507e09 rc1e44e5 102 102 John Wiley and Sons, New York, 1955 103 103 104 Source105 ------106 107 `stacked_disks.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/stacked_disks.py>`_108 109 `stacked_disks.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/stacked_disks.c>`_110 111 104 Authorship and Verification 112 105 ---------------------------- … … 115 108 * **Last Modified by:** Paul Butler and Paul Kienzle **Date:** November 26, 2016 116 109 * **Last Reviewed by:** Paul Butler and Paul Kienzle **Date:** November 26, 2016 117 * **Source added by :** Steve King **Date:** March 25, 2019118 110 """ 119 111 -
sasmodels/models/star_polymer.py
r0507e09 rc1e44e5 50 50 B Ewen *Macromolecules*, 22, 468-472 (1989) 51 51 52 Source53 ------54 55 `star_polymer.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/star_polymer.py>`_56 57 `star_polymer.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/star_polymer.c>`_58 59 52 Authorship and Verification 60 53 ---------------------------- … … 63 56 * **Last Modified by:** Paul Butler **Date:** Auguts 26, 2017 64 57 * **Last Reviewed by:** Ziang Li and Richard Heenan **Date:** May 17, 2017 65 * **Source added by :** Steve King **Date:** March 25, 201966 58 """ 67 59 -
sasmodels/models/stickyhardsphere.py
r4d00de6 r0d5dc05 78 78 .. [#] M Kotlarchyk and S-H Chen, *J. Chem. Phys.*, 79 (1983) 2461-2469 79 79 80 Source81 ------82 83 `stickyhardsphere.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/stickyhardsphere.py>`_84 85 80 Authorship and Verification 86 81 ---------------------------- … … 89 84 * **Last Modified by:** 90 85 * **Last Reviewed by:** Steve King **Date:** March 27, 2019 91 * **Source added by :** Steve King **Date:** March 25, 201992 86 """ 93 87 -
sasmodels/models/surface_fractal.py
r0507e09 rc1e44e5 38 38 .. [#] D Mildner and P Hall, *J. Phys. D: Appl. Phys.*, 19 (1986) 1535-1545 39 39 40 Source41 ------42 43 `surface_fractal.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/surface_fractal.py>`_44 45 `surface_fractal.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/surface_fractal.c>`_46 47 40 Authorship and Verification 48 41 ---------------------------- 49 42 50 * **Author:** 51 * **Last Modified by:** 52 * **Last Reviewed by:** 53 * **Source added by :** Steve King **Date:** March 25, 2019 43 * **Author:** 44 * **Last Modified by:** 45 * **Last Reviewed by:** 54 46 """ 55 47 -
sasmodels/models/teubner_strey.py
r0507e09 rc1e44e5 65 65 .. [#] H Endo, M Mihailescu, M. Monkenbusch, J Allgaier, G Gompper, D Richter, B Jakobs, T Sottmann, R Strey, and I Grillo, *J. Chem. Phys.*, 115 (2001), 580 66 66 67 Source68 ------69 70 `teubner_strey.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/teubner_strey.py>`_71 72 `teubner_strey.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/teubner_strey.c>`_73 74 67 Authorship and Verification 75 68 ---------------------------- 76 69 77 * **Author:** 78 * **Last Modified by:** 79 * **Last Reviewed by:** 80 * **Source added by :** Steve King **Date:** March 25, 2019 70 * **Author:** 71 * **Last Modified by:** 72 * **Last Reviewed by:** 81 73 """ 82 74 from __future__ import division -
sasmodels/models/triaxial_ellipsoid.py
ra34b811 rd57b06c 116 116 .. [#] Finnigan, J.A., Jacobs, D.J., 1971. *Light scattering by ellipsoidal particles in solution*, J. Phys. D: Appl. Phys. 4, 72-77. doi:10.1088/0022-3727/4/1/310 117 117 118 Source119 ------120 121 `triaxial_ellipsoid.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/triaxial_ellipsoid.py>`_122 123 `triaxial_ellipsoid.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/triaxial_ellipsoid.c>`_124 125 118 Authorship and Verification 126 119 ---------------------------- … … 129 122 * **Last Modified by:** Paul Kienzle (improved calculation) **Date:** April 4, 2017 130 123 * **Last Reviewed by:** Paul Kienzle & Richard Heenan **Date:** April 4, 2017 131 * **Source added by :** Steve King **Date:** March 25, 2019132 124 """ 133 125 -
sasmodels/models/two_lorentzian.py
r0507e09 rc1e44e5 27 27 None. 28 28 29 Source30 ------31 32 `two_lorentzian.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/two_lorentzian.py>`_33 34 29 Authorship and Verification 35 30 ---------------------------- … … 38 33 * **Last Modified by:** Piotr rozyczko **Date:** January 29, 2016 39 34 * **Last Reviewed by:** Paul Butler **Date:** March 21, 2016 40 * **Source added by :** Steve King **Date:** March 25, 201941 35 """ 42 36 -
sasmodels/models/two_power_law.py
r0507e09 rc1e44e5 37 37 None. 38 38 39 Source40 ------41 42 `two_power_law.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/two_power_law.py>`_43 44 39 Authorship and Verification 45 40 ---------------------------- … … 48 43 * **Last Modified by:** Wojciech Wpotrzebowski **Date:** February 18, 2016 49 44 * **Last Reviewed by:** Paul Butler **Date:** March 21, 2016 50 * **Source added by :** Steve King **Date:** March 25, 201951 45 """ 52 46 -
sasmodels/models/unified_power_Rg.py
rb606805 rd57b06c 67 67 .. [#] B Hammouda, *Analysis of the Beaucage model, J. Appl. Cryst.*, (2010), 43, 1474-1478 68 68 69 Source70 ------71 72 `unified_power_Rg.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/unified_power_Rg.py>`_73 74 69 Authorship and Verification 75 70 ---------------------------- 76 71 77 * **Author:** 78 * **Last Modified by:** 79 * **Last Reviewed by:** 80 * **Source added by :** Steve King **Date:** March 25, 2019 72 * **Author:** 73 * **Last Modified by:** 74 * **Last Reviewed by:** 81 75 """ 82 76 -
sasmodels/models/vesicle.py
ra34b811 rd57b06c 60 60 Sons, New York, (1955) 61 61 62 Source63 ------64 65 `vesicle.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/vesicle.py>`_66 67 `vesicle.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/vesicle.c>`_68 69 62 Authorship and Verification 70 63 ---------------------------- … … 73 66 * **Last Modified by:** Paul Butler **Date:** March 20, 2016 74 67 * **Last Reviewed by:** Paul Butler **Date:** September 7, 2018 75 * **Source added by :** Steve King **Date:** March 25, 201976 68 """ 77 69 -
doc/guide/pd/polydispersity.rst
rd089a00 ra5cb9bc 11 11 -------------------------------------------- 12 12 13 For some models we can calculate the average intensity for a population of 14 particles that possess size and/or orientational (ie, angular) distributions. 15 In SasView we call the former *polydispersity* but use the parameter *PD* to 16 parameterise both. In other words, the meaning of *PD* in a model depends on 13 For some models we can calculate the average intensity for a population of 14 particles that possess size and/or orientational (ie, angular) distributions. 15 In SasView we call the former *polydispersity* but use the parameter *PD* to 16 parameterise both. In other words, the meaning of *PD* in a model depends on 17 17 the actual parameter it is being applied too. 18 18 19 The resultant intensity is then normalized by the average particle volume such 19 The resultant intensity is then normalized by the average particle volume such 20 20 that 21 21 … … 24 24 P(q) = \text{scale} \langle F^* F \rangle / V + \text{background} 25 25 26 where $F$ is the scattering amplitude and $\langle\cdot\rangle$ denotes an 26 where $F$ is the scattering amplitude and $\langle\cdot\rangle$ denotes an 27 27 average over the distribution $f(x; \bar x, \sigma)$, giving 28 28 29 29 .. math:: 30 30 31 P(q) = \frac{\text{scale}}{V} \int_\mathbb{R} 31 P(q) = \frac{\text{scale}}{V} \int_\mathbb{R} 32 32 f(x; \bar x, \sigma) F^2(q, x)\, dx + \text{background} 33 33 34 34 Each distribution is characterized by a center value $\bar x$ or 35 35 $x_\text{med}$, a width parameter $\sigma$ (note this is *not necessarily* 36 the standard deviation, so read the description of the distribution carefully), 37 the number of sigmas $N_\sigma$ to include from the tails of the distribution, 38 and the number of points used to compute the average. The center of the 39 distribution is set by the value of the model parameter. 40 41 The distribution width applied to *volume* (ie, shape-describing) parameters 42 is relative to the center value such that $\sigma = \mathrm{PD} \cdot \bar x$. 43 However, the distribution width applied to *orientation* parameters is just 44 $\sigma = \mathrm{PD}$. 36 the standard deviation, so read the description carefully), the number of 37 sigmas $N_\sigma$ to include from the tails of the distribution, and the 38 number of points used to compute the average. The center of the distribution 39 is set by the value of the model parameter. The meaning of a polydispersity 40 parameter *PD* (not to be confused with a molecular weight distributions 41 in polymer science) in a model depends on the type of parameter it is being 42 applied too. 43 44 The distribution width applied to *volume* (ie, shape-describing) parameters 45 is relative to the center value such that $\sigma = \mathrm{PD} \cdot \bar x$. 46 However, the distribution width applied to *orientation* (ie, angle-describing) 47 parameters is just $\sigma = \mathrm{PD}$. 45 48 46 49 $N_\sigma$ determines how far into the tails to evaluate the distribution, … … 52 55 53 56 Users should note that the averaging computation is very intensive. Applying 54 polydispersion and/or orientational distributions to multiple parameters at 55 the same time, or increasing the number of points in the distribution, will 56 require patience! However, the calculations are generally more robust with 57 polydispersion and/or orientational distributions to multiple parameters at 58 the same time, or increasing the number of points in the distribution, will 59 require patience! However, the calculations are generally more robust with 57 60 more data points or more angles. 58 61 … … 66 69 * *Schulz Distribution* 67 70 * *Array Distribution* 71 * *User-defined Distributions* 68 72 69 73 These are all implemented as *number-average* distributions. 70 74 71 Additional distributions are under consideration.72 75 73 76 **Beware: when the Polydispersity & Orientational Distribution panel in SasView is** … … 75 78 **This may not be suitable. See Suggested Applications below.** 76 79 77 .. note:: In 2009 IUPAC decided to introduce the new term 'dispersity' to replace 78 the term 'polydispersity' (see `Pure Appl. Chem., (2009), 81(2), 79 351-353 <http://media.iupac.org/publications/pac/2009/pdf/8102x0351.pdf>`_ 80 in order to make the terminology describing distributions of chemical 81 properties unambiguous. However, these terms are unrelated to the 82 proportional size distributions and orientational distributions used in 80 .. note:: In 2009 IUPAC decided to introduce the new term 'dispersity' to replace 81 the term 'polydispersity' (see `Pure Appl. Chem., (2009), 81(2), 82 351-353 <http://media.iupac.org/publications/pac/2009/pdf/8102x0351.pdf>`_ 83 in order to make the terminology describing distributions of chemical 84 properties unambiguous. However, these terms are unrelated to the 85 proportional size distributions and orientational distributions used in 83 86 SasView models. 84 87 … … 92 95 or angular orientations, consider using the Gaussian or Boltzmann distributions. 93 96 94 If applying polydispersion to parameters describing angles, use the Uniform 95 distribution. Beware of using distributions that are always positive (eg, the 97 If applying polydispersion to parameters describing angles, use the Uniform 98 distribution. Beware of using distributions that are always positive (eg, the 96 99 Lognormal) because angles can be negative! 97 100 98 The array distribution allows a user-defined distribution to be applied. 101 The array distribution provides a very simple means of implementing a user- 102 defined distribution, but without any fittable parameters. Greater flexibility 103 is conferred by the user-defined distribution. 99 104 100 105 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ … … 334 339 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 335 340 341 User-defined Distributions 342 ^^^^^^^^^^^^^^^^^^^^^^^^^^ 343 344 You can also define your own distribution by creating a python file defining a 345 *Distribution* object with a *_weights* method. The *_weights* method takes 346 *center*, *sigma*, *lb* and *ub* as arguments, and can access *self.npts* 347 and *self.nsigmas* from the distribution. They are interpreted as follows: 348 349 * *center* the value of the shape parameter (for size dispersity) or zero 350 if it is an angular dispersity. This parameter may be fitted. 351 352 * *sigma* the width of the distribution, which is the polydispersity parameter 353 times the center for size dispersity, or the polydispersity parameter alone 354 for angular dispersity. This parameter may be fitted. 355 356 * *lb*, *ub* are the parameter limits (lower & upper bounds) given in the model 357 definition file. For example, a radius parameter has *lb* equal to zero. A 358 volume fraction parameter would have *lb* equal to zero and *ub* equal to one. 359 360 * *self.nsigmas* the distance to go into the tails when evaluating the 361 distribution. For a two parameter distribution, this value could be 362 co-opted to use for the second parameter, though it will not be available 363 for fitting. 364 365 * *self.npts* the number of points to use when evaluating the distribution. 366 The user will adjust this to trade calculation time for accuracy, but the 367 distribution code is free to return more or fewer, or use it for the third 368 parameter in a three parameter distribution. 369 370 As an example, the code following wraps the Laplace distribution from scipy stats:: 371 372 import numpy as np 373 from scipy.stats import laplace 374 375 from sasmodels import weights 376 377 class Dispersion(weights.Dispersion): 378 r""" 379 Laplace distribution 380 381 .. math:: 382 383 w(x) = e^{-\sigma |x - \mu|} 384 """ 385 type = "laplace" 386 default = dict(npts=35, width=0, nsigmas=3) # default values 387 def _weights(self, center, sigma, lb, ub): 388 x = self._linspace(center, sigma, lb, ub) 389 wx = laplace.pdf(x, center, sigma) 390 return x, wx 391 392 You can plot the weights for a given value and width using the following:: 393 394 from numpy import inf 395 from matplotlib import pyplot as plt 396 from sasmodels import weights 397 398 # reload the user-defined weights 399 weights.load_weights() 400 x, wx = weights.get_weights('laplace', n=35, width=0.1, nsigmas=3, value=50, 401 limits=[0, inf], relative=True) 402 403 # plot the weights 404 plt.interactive(True) 405 plt.plot(x, wx, 'x') 406 407 The *self.nsigmas* and *self.npts* parameters are normally used to control 408 the accuracy of the distribution integral. The *self._linspace* function 409 uses them to define the *x* values (along with the *center*, *sigma*, 410 *lb*, and *ub* which are passed as parameters). If you repurpose npts or 411 nsigmas you will need to generate your own *x*. Be sure to honour the 412 limits *lb* and *ub*, for example to disallow a negative radius or constrain 413 the volume fraction to lie between zero and one. 414 415 To activate a user-defined distribution, put it in a file such as *distname.py* 416 in the *SAS_WEIGHTS_PATH* folder. This is defined with an environment 417 variable, defaulting to:: 418 419 SAS_WEIGHTS_PATH=~/.sasview/weights 420 421 The weights path is loaded on startup. To update the distribution definition 422 in a running application you will need to enter the following python commands:: 423 424 import sasmodels.weights 425 sasmodels.weights.load_weights('path/to/distname.py') 426 427 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 428 336 429 Note about DLS polydispersity 337 430 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 338 431 339 Several measures of polydispersity abound in Dynamic Light Scattering (DLS) and 340 it should not be assumed that any of the following can be simply equated with 432 Several measures of polydispersity abound in Dynamic Light Scattering (DLS) and 433 it should not be assumed that any of the following can be simply equated with 341 434 the polydispersity *PD* parameter used in SasView. 342 435 343 The dimensionless **Polydispersity Index (PI)** is a measure of the width of the 344 distribution of autocorrelation function decay rates (*not* the distribution of 345 particle sizes itself, though the two are inversely related) and is defined by 436 The dimensionless **Polydispersity Index (PI)** is a measure of the width of the 437 distribution of autocorrelation function decay rates (*not* the distribution of 438 particle sizes itself, though the two are inversely related) and is defined by 346 439 ISO 22412:2017 as 347 440 … … 350 443 PI = \mu_{2} / \bar \Gamma^2 351 444 352 where $\mu_\text{2}$ is the second cumulant, and $\bar \Gamma^2$ is the 445 where $\mu_\text{2}$ is the second cumulant, and $\bar \Gamma^2$ is the 353 446 intensity-weighted average value, of the distribution of decay rates. 354 447 … … 359 452 PI = \sigma^2 / 2\bar \Gamma^2 360 453 361 where $\sigma$ is the standard deviation, allowing a **Relative Polydispersity (RP)** 454 where $\sigma$ is the standard deviation, allowing a **Relative Polydispersity (RP)** 362 455 to be defined as 363 456 … … 366 459 RP = \sigma / \bar \Gamma = \sqrt{2 \cdot PI} 367 460 368 PI values smaller than 0.05 indicate a highly monodisperse system. Values 461 PI values smaller than 0.05 indicate a highly monodisperse system. Values 369 462 greater than 0.7 indicate significant polydispersity. 370 463 371 The **size polydispersity P-parameter** is defined as the relative standard 372 deviation coefficient of variation 464 The **size polydispersity P-parameter** is defined as the relative standard 465 deviation coefficient of variation 373 466 374 467 .. math:: … … 377 470 378 471 where $\nu$ is the variance of the distribution and $\bar R$ is the mean 379 value of $R$. Here, the product $P \bar R$ is *equal* to the standard 472 value of $R$. Here, the product $P \bar R$ is *equal* to the standard 380 473 deviation of the Lognormal distribution. 381 474 -
sasmodels/compare.py
rb297ba9 rd0b0f5d 39 39 40 40 from . import core 41 from . import weights 41 42 from . import kerneldll 42 43 from . import kernelcl … … 45 46 from .direct_model import DirectModel, get_mesh 46 47 from .generate import FLOAT_RE, set_integration_size 47 from .weights import plot_weights48 48 49 49 # pylint: disable=unused-import … … 115 115 116 116 === environment variables === 117 -DSAS_MODELPATH=path sets directory containing custom models 117 -DSAS_MODELPATH=~/.sasmodels/custom_models sets path to custom models 118 -DSAS_WEIGHTS_PATH=~/.sasview/weights sets path to custom distributions 118 119 -DSAS_OPENCL=vendor:device|cuda:device|none sets the target GPU device 119 120 -DXDG_CACHE_HOME=~/.cache sets the pyopencl cache root (linux only) 120 121 -DSAS_COMPILER=tinycc|msvc|mingw|unix sets the DLL compiler 121 -DSAS_OPENMP= 1 turnson OpenMP for the DLLs122 -DSAS_DLL_PATH= path sets the path to the compiled modules122 -DSAS_OPENMP=0 set to 1 to turn on OpenMP for the DLLs 123 -DSAS_DLL_PATH=~/.sasmodels/compiled_models sets the DLL cache 123 124 124 125 The interpretation of quad precision depends on architecture, and may … … 784 785 model_info = base._kernel.info 785 786 dim = base._kernel.dim 786 plot_weights(model_info, get_mesh(model_info, base_pars, dim=dim))787 weights.plot_weights(model_info, get_mesh(model_info, base_pars, dim=dim)) 787 788 if opts['show_profile']: 788 789 import pylab … … 1441 1442 #import pprint; pprint.pprint(model_info) 1442 1443 1444 # Hack to load user-defined distributions; run through all parameters 1445 # and make sure any pd_type parameter is a defined distribution. 1446 if (any(p.endswith('pd_type') and v not in weights.MODELS 1447 for p, v in pars.items()) or 1448 any(p.endswith('pd_type') and v not in weights.MODELS 1449 for p, v in pars2.items())): 1450 weights.load_weights() 1451 1443 1452 if opts['show_pars']: 1444 1453 if model_info.name != model_info2.name or pars != pars2: -
sasmodels/models/__init__.py
r2d81cfe rd827c5e 1 1 """ 2 1D Modeling for SAS 2 Model definition files 3 ---------------------- 4 5 The models below are grouped by type. The list is a snapshot at a particular 6 time and may be out of date. 7 8 Models with pure form factor (all of which define *F(Q)*): 9 10 :mod:`barbell` 11 :mod:`capped_cylinder` 12 :mod:`core_multi_shell` 13 :mod:`core_shell_bicelle` 14 :mod:`core_shell_bicelle_elliptical` 15 :mod:`core_shell_bicelle_elliptical_belt_rough` 16 :mod:`core_shell_cylinder` 17 :mod:`core_shell_ellipsoid` 18 :mod:`core_shell_parallelepipied` 19 :mod:`core_shell_sphere` 20 :mod:`cylinder` [limiting conditions (long rods, thin disks) not implemented] 21 :mod:`ellipsoid` 22 :mod:`elliptical_cylinder` 23 :mod:`fuzzy_sphere` 24 :mod:`hollow_cylinder` 25 :mod:`hollow_rectangular_prism` 26 :mod:`hollow_rectangular_prism_thin_walls` 27 :mod:`multilayer_vesicle` 28 :mod:`onion` 29 :mod:`parallelepiped` 30 :mod:`rectangular_prism` 31 :mod:`sphere` 32 :mod:`spherical_sld` 33 :mod:`triaxial_ellipsoid` 34 :mod:`vesicle` 35 36 Models with local structure factor: 37 38 :mod:`flexible_cylinder` 39 :mod:`flexible_cylinder_elliptical` 40 :mod:`linear_pearls` 41 :mod:`mono_gauss_coil` 42 :mod:`pearl_necklace` 43 :mod:`poly_gauss_coil` 44 :mod:`polymer_micelle` 45 :mod:`pringle` 46 :mod:`raspberry` 47 :mod:`stacked_disks` 48 :mod:`star_polymer` 49 50 Models with long range structure factor: 51 52 :mod:`binary_hard_sphere` 53 :mod:`bcc_paracrystal` 54 :mod:`fcc_paracrystal` 55 :mod:`fractal` 56 :mod:`fractal_core_shell` 57 :mod:`lamellar` 58 :mod:`lamellar_hg` 59 :mod:`lamellar_hg_stack_caille` 60 :mod:`lamellar_stack_caille` 61 :mod:`lamellar_stack_paracrystal` 62 :mod:`mass_fractal` 63 :mod:`mass_surface_fractal` 64 :mod:`rpa` 65 :mod:`sc_paracrystal` 66 :mod:`surface_fractal` 67 68 Models which are pure structure factors:: 69 70 :mod:`hardsphere` 71 :mod:`hayter_msa` 72 :mod:`squarewell` 73 :mod:`stickyhardsphere` 74 75 Other models: 76 77 :mod:`adsorbed_layer` 78 :mod:`be_polyelectrolyte` 79 :mod:`broad_peak` 80 :mod:`correlation_length` 81 :mod:`dab` 82 :mod:`gauss_lorentz_gel` 83 :mod:`gaussian_peak` 84 :mod:`gel_fit` 85 :mod:`guinier_porod` 86 :mod:`guinier` 87 :mod:`line` 88 :mod:`lorentz` 89 :mod:`peak_lorentz` 90 :mod:`polymer_excl_volume` 91 :mod:`porod` 92 :mod:`power_law` 93 :mod:`spinodal` 94 :mod:`teubner_strey` 95 :mod:`two_lorentzian` 96 :mod:`unified_power_Rg` 97 3 98 """ -
sasmodels/sasview_model.py
ra34b811 rd0b0f5d 31 31 from . import modelinfo 32 32 from .details import make_kernel_args, dispersion_mesh 33 34 # Hack: load in any custom distributions 35 # Uses ~/.sasview/weights/*.py unless SASMODELS_WEIGHTS is set in the environ. 36 # Override with weights.load_weights(pattern="<weights_path>/*.py") 37 weights.load_weights() 33 38 34 39 # pylint: disable=unused-import -
sasmodels/weights.py
rb297ba9 rd0b0f5d 230 230 )) 231 231 232 SAS_WEIGHTS_PATH = "~/.sasview/weights" 233 def load_weights(pattern=None): 234 # type: (str) -> None 235 """ 236 Load dispersion distributions matching the given glob pattern 237 """ 238 import logging 239 import os 240 import os.path 241 import glob 242 import traceback 243 from .custom import load_custom_kernel_module 244 if pattern is None: 245 path = os.environ.get("SAS_WEIGHTS_PATH", SAS_WEIGHTS_PATH) 246 pattern = os.path.join(path, "*.py") 247 for filename in sorted(glob.glob(os.path.expanduser(pattern))): 248 try: 249 #print("loading weights from", filename) 250 module = load_custom_kernel_module(filename) 251 MODELS[module.Dispersion.type] = module.Dispersion 252 except Exception as exc: 253 logging.error(traceback.format_exc(exc)) 232 254 233 255 def get_weights(disperser, n, width, nsigmas, value, limits, relative):
Note: See TracChangeset
for help on using the changeset viewer.