Changeset 2d81cfe in sasmodels for sasmodels/resolution.py
- Timestamp:
- Nov 29, 2017 11:13:23 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:
- 237b800f
- Parents:
- a839b22
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/resolution.py
r990d8df r2d81cfe 5 5 """ 6 6 from __future__ import division 7 8 import unittest 7 9 8 10 from scipy.special import erf # type: ignore … … 85 87 86 88 # Build weight matrix from calculated q values 87 self.weight_matrix = pinhole_resolution( self.q_calc, self.q,88 89 self.weight_matrix = pinhole_resolution( 90 self.q_calc, self.q, np.maximum(q_width, MINIMUM_RESOLUTION)) 89 91 self.q_calc = abs(self.q_calc) 90 92 … … 476 478 # unit tests 477 479 ############################################################################ 478 import unittest479 480 480 481 481 def eval_form(q, form, pars): … … 547 547 f_at_u = np.interp(u_sub, q_calc, Iq) 548 548 #print(np.trapz(Iu, w_grid, axis=1)) 549 total 549 total = np.trapz(np.trapz(f_at_u, w_grid, axis=1), h_grid[:, 0]) 550 550 result[i] = total / (2*h*w) 551 551 # from scipy.integrate import dblquad
Note: See TracChangeset
for help on using the changeset viewer.