Changeset 6c497b7 in sasview for src/sas/sascalc/dataloader/manipulations.py
- Timestamp:
- Apr 16, 2017 1:01:30 PM (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, costrafo411, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- f94a935
- Parents:
- de99a5f0 (diff), e5cbbce (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/dataloader/manipulations.py
rc0ca2e3d r6c497b7 24 24 import numpy as np 25 25 import sys 26 26 27 27 #from data_info import plottable_2D 28 28 from data_info import Data1D … … 226 226 # def; dqx_data = dq_r dqy_data = dq_phi 227 227 # Convert dq 2D to 1D here 228 dq_data = np.sqrt(dqx_data**2 + dqx_data**2) 228 dq_data = np.sqrt(dqx_data**2 + dqx_data**2) 229 229 return dq_data 230 230 … … 602 602 dq_data = get_dq_data(data2D) 603 603 604 #q_data_max = np.max(q_data) 605 if len(data2D.q_data) is None: 604 if len(q_data) == 0: 606 605 msg = "Circular averaging: invalid q_data: %g" % data2D.q_data 607 606 raise RuntimeError(msg) … … 734 733 735 734 # Set space for 1d outputs 736 737 735 phi_bins = np.zeros(self.nbins_phi) 736 phi_counts = np.zeros(self.nbins_phi) 738 737 phi_values = np.zeros(self.nbins_phi) 739 738 phi_err = np.zeros(self.nbins_phi) … … 844 843 phi_min = flip_phi(self.phi_min) 845 844 phi_max = flip_phi(self.phi_max) 846 845 847 846 # binning object 848 847 if run.lower() == 'phi': … … 850 849 else: 851 850 binning = Binning(self.r_min, self.r_max, self.nbins, self.base) 852 851 853 852 for n in range(len(data)): 854 853
Note: See TracChangeset
for help on using the changeset viewer.