Changeset 4c08e69 in sasmodels
- Timestamp:
- Jan 9, 2018 2:14:34 PM (7 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- c11d09f
- Parents:
- 22279a4 (diff), 791281c (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. - Files:
-
- 2 added
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
extra/pylint.rc
rb669b49 r6e68289 21 21 # List of plugins (as comma separated values of python modules names) to load, 22 22 # usually to register additional checkers. 23 load-plugins=pylint_numpy,pylint_pyopencl,pylint_sas23 #load-plugins=pylint_numpy,pylint_scipy,pylint_pyopencl,pylint_sas 24 24 25 25 # Use multiple processes to speed up Pylint. … … 280 280 # (useful for modules/projects where namespaces are manipulated during runtime 281 281 # and thus existing member attributes cannot be deduced by static analysis 282 ignored-modules=numpy,np,numpy.random, 283 bumps,sas, 282 ignored-modules=bumps,sas,numpy,numpy.random,scipy,scipy.special 284 283 285 284 # List of classes names for which member attributes should not be checked -
sasmodels/models/_spherepy.py
r2d81cfe ref07e95 40 40 John Wiley and Sons, New York, (1955) 41 41 42 * 2013/09/09 and 2014/01/06 - Description reviewed by S King and P Parker.*42 * **Last Reviewed by:** S King and P Parker **Date:** 2013/09/09 and 2014/01/06 43 43 """ 44 44 -
sasmodels/models/be_polyelectrolyte.py
r2d81cfe ref07e95 67 67 * **Author:** NIST IGOR/DANSE **Date:** pre 2010 68 68 * **Last Modified by:** Paul Kienzle **Date:** July 24, 2016 69 * **Last Reviewed by:** Paul Butler and Richard Heenan **Date:** 70 October 07, 2016 69 * **Last Reviewed by:** Paul Butler and Richard Heenan **Date:** October 07, 2016 71 70 """ 72 71 -
sasmodels/models/fractal_core_shell.py
r2d81cfe ref07e95 55 55 56 56 * **Author:** NIST IGOR/DANSE **Date:** pre 2010 57 * **Last Modified by:** Paul Butler and Paul Kienzle ** on:** November 27, 201658 * **Last Reviewed by:** Paul Butler and Paul Kienzle ** on:** November 27, 201657 * **Last Modified by:** Paul Butler and Paul Kienzle **Date:** November 27, 2016 58 * **Last Reviewed by:** Paul Butler and Paul Kienzle **Date:** November 27, 2016 59 59 """ 60 60 -
sasmodels/models/multilayer_vesicle.py
r2d81cfe ref07e95 107 107 * **Last Modified by:** Paul Kienzle **Date:** Feb 7, 2017 108 108 * **Last Reviewed by:** Paul Butler **Date:** March 12, 2017 109 110 109 """ 111 110 -
sasmodels/models/parallelepiped.py
r2d81cfe ref07e95 167 167 ---------------------------- 168 168 169 * **Author:** This model is based on form factor calculations implemented 170 in a c-library provided by the NIST Center for Neutron Research (Kline, 2006). 169 * **Author:** NIST IGOR/DANSE **Date:** pre 2010 171 170 * **Last Modified by:** Paul Kienzle **Date:** April 05, 2017 172 171 * **Last Reviewed by:** Richard Heenan **Date:** April 06, 2017 -
sasmodels/models/polymer_micelle.py
r2d81cfe r791281c 28 28 .. math:: 29 29 P(q) &= N^2\beta^2_s\Phi(qr)^2 + N\beta^2_cP_c(q) 30 + 2N^2\beta_s\beta_cS_{sc} s_c(q) + N(N-1)\beta_c^2S_{cc}(q) \\30 + 2N^2\beta_s\beta_cS_{sc}(q) + N(N-1)\beta_c^2S_{cc}(q) \\ 31 31 \beta_s &= V_\text{core}(\rho_\text{core} - \rho_\text{solvent}) \\ 32 32 \beta_c &= V_\text{corona}(\rho_\text{corona} - \rho_\text{solvent}) … … 69 69 70 70 J Pedersen, *J. Appl. Cryst.*, 33 (2000) 637-640 71 72 * **Modified by:** Richard Heenan **Date:** March 20, 2016 73 * **Verified by:** Paul Kienzle **Date:** November 29, 2017 74 * **Description modified by:** Paul Kienzle **Date:** November 29, 2017 75 * **Description reviewed by:** Steve King **Date:** November 30, 2017 71 76 """ 72 77 -
sasmodels/models/pringle.py
r2d81cfe ref07e95 43 43 Derivation by Stefan Alexandru Rautu. 44 44 45 **Author:** Andrew Jackson **on:** 2008 46 47 **Last Modified by:** Wojciech Wpotrzebowski **on:** March 20, 2016 48 49 **Last Reviewed by:** Andrew Jackson **on:** September 26, 2016 45 * **Author:** Andrew Jackson **Date:** 2008 46 * **Last Modified by:** Wojciech Wpotrzebowski **Date:** March 20, 2016 47 * **Last Reviewed by:** Andrew Jackson **Date:** September 26, 2016 50 48 """ 51 49 -
sasmodels/models/raspberry.py
r2d81cfe ref07e95 102 102 Science*, 343(1) (2010) 36-41 103 103 104 **Author:** Andrew Jackson **on:** 2008 105 106 **Modified by:** Andrew Jackson **on:** March 20, 2016 107 108 **Reviewed by:** Andrew Jackson **on:** March 20, 2016 104 * **Author:** Andrew Jackson **Date:** 2008 105 * **Modified by:** Andrew Jackson **Date:** March 20, 2016 106 * **Reviewed by:** Andrew Jackson **Date:** March 20, 2016 109 107 """ 110 108 -
sasmodels/models/sphere.py
r2d81cfe ref07e95 40 40 John Wiley and Sons, New York, (1955) 41 41 42 * 2013/09/09 and 2014/01/06 - Description reviewed by S King and P Parker.*42 * **Last Reviewed by:** S King and P Parker **Date:** 2013/09/09 and 2014/01/06 43 43 """ 44 44 -
sasmodels/models/spinodal.py
r2d81cfe ref07e95 26 26 27 27 * **Author:** Dirk Honecker **Date:** Oct 7, 2016 28 * **Last Modified by:**29 * **Last Reviewed by:**30 28 """ 31 29 -
sasmodels/models/stacked_disks.py
r2d81cfe ref07e95 106 106 107 107 * **Author:** NIST IGOR/DANSE **Date:** pre 2010 108 * **Last Modified by:** Paul Butler and Paul Kienzle ** on:** November 26, 2016109 * **Last Reviewed by:** Paul Butler and Paul Kienzle ** on:** November 26, 2016108 * **Last Modified by:** Paul Butler and Paul Kienzle **Date:** November 26, 2016 109 * **Last Reviewed by:** Paul Butler and Paul Kienzle **Date:** November 26, 2016 110 110 """ 111 111 -
sasmodels/models/triaxial_ellipsoid.py
r2d81cfe r37f08d2 162 162 Returns the effective radius used in the S*P calculation 163 163 """ 164 import numpy as np165 164 from .ellipsoid import ER as ellipsoid_ER 166 165 -
sasmodels/models/two_lorentzian.py
r2d81cfe ref07e95 27 27 None. 28 28 29 **Author:** NIST IGOR/DANSE **on:** pre 2010 30 31 **Last Modified by:** Piotr rozyczko **on:** January 29, 2016 32 33 **Last Reviewed by:** Paul Butler **on:** March 21, 2016 29 * **Author:** NIST IGOR/DANSE **Date:** pre 2010 30 * **Last Modified by:** Piotr rozyczko **Date:** January 29, 2016 31 * **Last Reviewed by:** Paul Butler **Date:** March 21, 2016 34 32 """ 35 33 -
sasmodels/models/two_power_law.py
r2d81cfe ref07e95 37 37 None. 38 38 39 **Author:** NIST IGOR/DANSE **on:** pre 2010 40 41 **Last Modified by:** Wojciech Wpotrzebowski **on:** February 18, 2016 42 43 **Last Reviewed by:** Paul Butler **on:** March 21, 2016 39 * **Author:** NIST IGOR/DANSE **Date:** pre 2010 40 * **Last Modified by:** Wojciech Wpotrzebowski **Date:** February 18, 2016 41 * **Last Reviewed by:** Paul Butler **Date:** March 21, 2016 44 42 """ 45 43 -
sasmodels/models/vesicle.py
r2d81cfe ref07e95 56 56 Sons, New York, (1955) 57 57 58 **Author:** NIST IGOR/DANSE **on:** pre 2010 59 60 **Last Modified by:** Paul Butler **on:** March 20, 2016 61 62 **Last Reviewed by:** Paul Butler **on:** March 20, 2016 58 * **Author:** NIST IGOR/DANSE **Date:** pre 2010 59 * **Last Modified by:** Paul Butler **Date:** March 20, 2016 60 * **Last Reviewed by:** Paul Butler **Date:** March 20, 2016 63 61 """ 64 62 -
doc/guide/pd/polydispersity.rst
reda8b30 r22279a4 42 42 calculations are generally more robust with more data points or more angles. 43 43 44 The following fivedistribution functions are provided:44 The following distribution functions are provided: 45 45 46 46 * *Rectangular Distribution* 47 * *Uniform Distribution* 47 48 * *Gaussian Distribution* 48 49 * *Lognormal Distribution* 49 50 * *Schulz Distribution* 50 51 * *Array Distribution* 52 * *Boltzmann Distribution* 51 53 52 54 These are all implemented as *number-average* distributions. … … 85 87 Rectangular distribution. 86 88 89 Uniform Distribution 90 ^^^^^^^^^^^^^^^^^^^^^^^^ 91 92 The Uniform Distribution is defined as 93 94 .. math:: 95 96 f(x) = \frac{1}{\text{Norm}} 97 \begin{cases} 98 1 & \text{for } |x - \bar x| \leq \sigma \\ 99 0 & \text{for } |x - \bar x| > \sigma 100 \end{cases} 101 102 where $\bar x$ is the mean of the distribution, $\sigma$ is the half-width, and 103 *Norm* is a normalization factor which is determined during the numerical 104 calculation. 105 106 Note that the polydispersity is given by 107 108 .. math:: \text{PD} = \sigma / \bar x 109 110 .. figure:: pd_uniform.jpg 111 112 Uniform distribution. 113 87 114 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 88 115 … … 183 210 ^^^^^^^^^^^^^^^^^^ 184 211 185 This user-definable distribution should be given as a s asimple ASCII text212 This user-definable distribution should be given as a simple ASCII text 186 213 file where the array is defined by two columns of numbers: $x$ and $f(x)$. 187 214 The $f(x)$ will be normalized to 1 during the computation. … … 202 229 given for the model will have no affect, and will be ignored when computing 203 230 the average. This means that any parameter with an array distribution will 204 not be fittable. 231 not be fitable. 232 233 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 234 235 Boltzmann Distribution 236 ^^^^^^^^^^^^^^^^^^^^^^ 237 238 The Boltzmann Distribution is defined as 239 240 .. math:: 241 242 f(x) = \frac{1}{\text{Norm}} 243 \exp\left(-\frac{ | x - \bar x | }{\sigma}\right) 244 245 where $\bar x$ is the mean of the distribution and *Norm* is a normalization 246 factor which is determined during the numerical calculation. 247 The width is defined as 248 249 .. math:: \sigma=\frac{k T}{E} 250 251 which is the inverse Boltzmann factor, 252 where $k$ is the Boltzmann constant, $T$ the temperature in Kelvin and $E$ a 253 characteristic energy per particle. 254 255 .. figure:: pd_boltzmann.jpg 256 257 Boltzmann distribution. 205 258 206 259 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ -
sasmodels/weights.py
r2d81cfe r34bbb9c 97 97 return x, px 98 98 99 class UniformDispersion(Dispersion): 100 r""" 101 Uniform dispersion, with width $\sigma$. 102 103 .. math:: 104 105 w = 1 106 """ 107 type = "uniform" 108 default = dict(npts=35, width=0, nsigmas=1) 109 def _weights(self, center, sigma, lb, ub): 110 x = self._linspace(center, sigma, lb, ub) 111 x = x[np.fabs(x-center) <= np.fabs(sigma)] 112 return x, np.ones_like(x) 99 113 100 114 class RectangleDispersion(Dispersion): … … 190 204 return x, px 191 205 206 class BoltzmannDispersion(Dispersion): 207 r""" 208 Boltzmann dispersion, with $\sigma=k T/E$. 209 210 .. math:: 211 212 w = \exp\left( -|x - c|/\sigma\right) 213 """ 214 type = "boltzmann" 215 default = dict(npts=35, width=0, nsigmas=3) 216 def _weights(self, center, sigma, lb, ub): 217 x = self._linspace(center, sigma, lb, ub) 218 px = np.exp(-np.abs(x-center) / np.abs(sigma)) 219 return x, px 192 220 193 221 # dispersion name -> disperser lookup table. … … 196 224 MODELS = OrderedDict((d.type, d) for d in ( 197 225 RectangleDispersion, 226 UniformDispersion, 198 227 ArrayDispersion, 199 228 LogNormalDispersion, 200 229 GaussianDispersion, 201 230 SchulzDispersion, 231 BoltzmannDispersion 202 232 )) 203 233
Note: See TracChangeset
for help on using the changeset viewer.