Changeset deaa0c6 in sasview for src/sas/sascalc/dataloader
- Timestamp:
- Sep 25, 2017 1:58:13 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, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- ffb6474
- Parents:
- 7b07fbe
- Location:
- src/sas/sascalc/dataloader
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/dataloader/data_info.py
r17e257b5 rdeaa0c6 1176 1176 final_dataset.yaxis(data._yaxis, data._yunit) 1177 1177 final_dataset.zaxis(data._zaxis, data._zunit) 1178 final_dataset.x_bins = data.x_bins 1179 final_dataset.y_bins = data.y_bins 1178 if len(data.data.shape) == 2: 1179 n_rows, n_cols = data.data.shape 1180 final_dataset.y_bins = data.qy_data[0::int(n_cols)] 1181 final_dataset.x_bins = data.qx_data[:int(n_cols)] 1180 1182 else: 1181 1183 return_string = "Should Never Happen: _combine_data_info_with_plottable input is not a plottable1d or " + \ -
src/sas/sascalc/dataloader/file_reader_base_class.py
r7b07fbe rdeaa0c6 167 167 dataset.x_bins = dataset.qx_data[:int(n_cols)] 168 168 dataset.data = dataset.data.flatten() 169 if len(dataset.data) > 0: 170 dataset.xmin = np.min(dataset.qx_data) 171 dataset.xmax = np.max(dataset.qx_data) 172 dataset.ymin = np.min(dataset.qy_data) 173 dataset.ymax = np.max(dataset.qx_data) 169 174 170 175 def format_unit(self, unit=None): … … 249 254 has_error_dy = self.current_dataset.err_data is not None 250 255 has_mask = self.current_dataset.mask is not None 251 has_q_data = self.current_dataset.q_data is not None252 256 x = self.current_dataset.qx_data 253 257 self.current_dataset.data = self.current_dataset.data[x != 0] 254 258 self.current_dataset.qx_data = self.current_dataset.qx_data[x != 0] 255 259 self.current_dataset.qy_data = self.current_dataset.qy_data[x != 0] 260 self.current_dataset.q_data = np.sqrt( 261 np.square(self.current_dataset.qx_data) + np.square( 262 self.current_dataset.qy_data)) 256 263 if has_error_dy: 257 264 self.current_dataset.err_data = self.current_dataset.err_data[x != 0] … … 262 269 if has_mask: 263 270 self.current_dataset.mask = self.current_dataset.mask[x != 0] 264 if has_q_data:265 self.current_dataset.q_data = self.current_dataset.q_data[x != 0]266 271 267 272 def reset_data_list(self, no_lines=0):
Note: See TracChangeset
for help on using the changeset viewer.