- Timestamp:
- Sep 14, 2017 10:38:14 AM (7 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, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- c54c965
- Parents:
- cd57c7d4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/invariant/invariant.py
r7432acb rb1f20d1 610 610 # Data boundaries for fitting 611 611 qmin = self._data.x[0] 612 qmax = self._data.x[ self._low_extrapolation_npts - 1]612 qmax = self._data.x[int(self._low_extrapolation_npts - 1)] 613 613 614 614 # Extrapolate the low-Q data … … 649 649 # Data boundaries for fitting 650 650 x_len = len(self._data.x) - 1 651 qmin = self._data.x[ x_len - (self._high_extrapolation_npts - 1)]652 qmax = self._data.x[ x_len]651 qmin = self._data.x[int(x_len - (self._high_extrapolation_npts - 1))] 652 qmax = self._data.x[int(x_len)] 653 653 654 654 # fit the data with a model to get the appropriate parameters … … 688 688 if npts_in is None: 689 689 npts_in = self._low_extrapolation_npts 690 q_end = self._data.x[max(0, npts_in - 1)]690 q_end = self._data.x[max(0, int(npts_in - 1))] 691 691 692 692 if q_start >= q_end: … … 714 714 # Get extrapolation range 715 715 if npts_in is None: 716 npts_in = self._high_extrapolation_npts716 npts_in = int(self._high_extrapolation_npts) 717 717 _npts = len(self._data.x) 718 q_start = self._data.x[min(_npts, _npts - npts_in)]718 q_start = self._data.x[min(_npts, int(_npts - npts_in))] 719 719 720 720 if q_start >= q_end:
Note: See TracChangeset
for help on using the changeset viewer.