Changeset 3d58247 in sasmodels for sasmodels/weights.py
- Timestamp:
- Jan 12, 2018 8:57:34 AM (6 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.