Changeset 9a5097c in sasview for src/sas/sascalc/data_util/qsmearing.py
- Timestamp:
- Mar 26, 2017 11:33:16 PM (8 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- ed2276f
- Parents:
- 9146ed9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/data_util/qsmearing.py
r775e0b7 r9a5097c 9 9 #copyright 2008, University of Tennessee 10 10 ###################################################################### 11 import numpy12 11 import math 13 12 import logging … … 60 59 if data.dx is not None and data.isSesans: 61 60 #if data.dx[0] > 0.0: 62 if n umpy.size(data.dx[data.dx <= 0]) == 0:61 if np.size(data.dx[data.dx <= 0]) == 0: 63 62 _found_sesans = True 64 63 # if data.dx[0] <= 0.0: 65 if n umpy.size(data.dx[data.dx <= 0]) > 0:64 if np.size(data.dx[data.dx <= 0]) > 0: 66 65 raise ValueError('one or more of your dx values are negative, please check the data file!') 67 66 … … 121 120 self.resolution = resolution 122 121 if offset is None: 123 offset = n umpy.searchsorted(self.resolution.q_calc, self.resolution.q[0])122 offset = np.searchsorted(self.resolution.q_calc, self.resolution.q[0]) 124 123 self.offset = offset 125 124 … … 137 136 start, end = first_bin + self.offset, last_bin + self.offset 138 137 q_calc = self.resolution.q_calc 139 iq_calc = n umpy.empty_like(q_calc)138 iq_calc = np.empty_like(q_calc) 140 139 if start > 0: 141 140 iq_calc[:start] = self.model.evalDistribution(q_calc[:start]) … … 157 156 """ 158 157 q = self.resolution.q 159 first = n umpy.searchsorted(q, q_min)160 last = n umpy.searchsorted(q, q_max)158 first = np.searchsorted(q, q_min) 159 last = np.searchsorted(q, q_max) 161 160 return first, min(last,len(q)-1) 162 161
Note: See TracChangeset
for help on using the changeset viewer.