Changeset 3d58247 in sasmodels
- Timestamp:
- Jan 12, 2018 10:57:34 AM (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:
- 92d330fd
- Parents:
- 3c44c34
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/guide/pd/polydispersity.rst
r22279a4 r3d58247 71 71 where $\bar x$ is the mean of the distribution, $w$ is the half-width, and 72 72 *Norm* is a normalization factor which is determined during the numerical 73 calculation. 73 calculation. 74 74 75 75 Note that the standard deviation and the half width $w$ are different! … … 86 86 87 87 Rectangular distribution. 88 89 88 90 89 91 Uniform Distribution … … 102 104 where $\bar x$ is the mean of the distribution, $\sigma$ is the half-width, and 103 105 *Norm* is a normalization factor which is determined during the numerical 104 calculation. 106 calculation. 105 107 106 108 Note that the polydispersity is given by … … 111 113 112 114 Uniform distribution. 115 116 The value $N_\sigma$ is ignored for this distribution. 113 117 114 118 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ … … 196 200 197 201 Note that larger values of PD might need larger number of points and $N_\sigma$. 198 For example, at PD=0.7 and radius=60 |Ang|, Npts>=160 and Nsigmas>=15 at least.202 For example, at PD=0.7 and radius=60 |Ang|, Npts>=160 and $N_\sigma$>=15 at least. 199 203 200 204 .. figure:: pd_schulz.jpg -
sasmodels/weights.py
r3c44c34 r3d58247 106 106 """ 107 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)]108 default = dict(npts=35, width=0, nsigmas=None) 109 def _weights(self, center, sigma, lb, ub): 110 x = np.linspace(center-sigma, center+sigma, self.npts) 111 x = x[(x >= lb) & (x <= ub)] 112 112 return x, np.ones_like(x) 113 113 … … 123 123 default = dict(npts=35, width=0, nsigmas=1.73205) 124 124 def _weights(self, center, sigma, lb, ub): 125 x = self._linspace(center, sigma, lb, ub) 126 x = x[np.fabs(x-center) <= np.fabs(sigma)*sqrt(3.0)] 127 return x, np.ones_like(x) 128 125 x = self._linspace(center, sigma, lb, ub) 126 x = x[np.fabs(x-center) <= np.fabs(sigma)*sqrt(3.0)] 127 return x, np.ones_like(x) 129 128 130 129 class LogNormalDispersion(Dispersion):
Note: See TracChangeset
for help on using the changeset viewer.