Changeset f1a8811 in sasmodels
- Timestamp:
- Sep 27, 2016 5:20:54 PM (8 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 050c2c8
- Parents:
- bb46723
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/weights.py
rbb46723 rf1a8811 120 120 def _weights(self, center, sigma, lb, ub): 121 121 x = self._linspace(center, sigma, max(lb, 1e-8), max(ub, 1e-8)) 122 px = np.exp(-0.5*(np.log(x)-center)**2/sigma**2)/(x*sigma) 122 # sigma in the lognormal function is in ln(R) space, thus needs converting 123 sig = np.fabs(sigma/center) 124 px = np.exp(-0.5*((np.log(x)-np.log(center))/sig)**2)/(x*sig) 123 125 return x, px 124 126 … … 246 248 pylab.grid(True) 247 249 pylab.legend() 250 #pylab.show()
Note: See TracChangeset
for help on using the changeset viewer.