Changeset 248ff73 in sasview for src/sas/sascalc/dataloader
- Timestamp:
- Aug 1, 2017 9:36:38 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, costrafo411, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 5a8cdbb
- Parents:
- b2c28a5
- Location:
- src/sas/sascalc/dataloader
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/dataloader/file_reader_base_class.py
ra78433dd r248ff73 66 66 if not self.f_open.closed: 67 67 self.f_open.close() 68 if len(self.output) > 0: 69 # Sort the data that's been loaded 70 self.sort_one_d_data() 71 self.sort_two_d_data() 68 72 else: 69 73 msg = "Unable to find file at: {}\n".format(filepath) 70 74 msg += "Please check your file path and try again." 71 75 self.handle_error_message(msg) 72 73 if isinstance(self.output[0], Data1D):74 self.sort_one_d_data()75 elif isinstance(self.output[0], Data2D):76 self.sort_two_d_data()77 76 78 77 # Return a list of parsed entries that data_loader can manage … … 122 121 if data.dlam is not None: 123 122 data.dlam = np.asarray([data.dlam[i] for i in ind]).astype(np.float64) 124 data.xmin = np.min(data.x)125 data.xmax = np.max(data.x)126 data.ymin = np.min(data.y)127 data.ymax = np.max(data.y)128 final_list.append(data)129 self.output = final_list130 self.remove_empty_q_values()123 if len(data.x > 0): 124 data.xmin = np.min(data.x) 125 data.xmax = np.max(data.x) 126 data.ymin = np.min(data.y) 127 data.ymax = np.max(data.y) 128 # final_list.append(data) 129 # self.output = final_list 131 130 132 131 def sort_two_d_data(self): … … 157 156 dataset.x_bins = dataset.qx_data[:int(n_cols)] 158 157 dataset.data = dataset.data.flatten() 159 final_list.append(dataset)160 self.output = final_list158 # final_list.append(dataset) 159 # self.output = final_list 161 160 162 161 def set_all_to_none(self): -
src/sas/sascalc/dataloader/readers/associations.py
r371b9e2 r248ff73 37 37 Read the specified settings file to associate 38 38 default readers to file extension. 39 39 40 40 :param loader: Loader object 41 41 :param settings: path to the json settings file [string] -
src/sas/sascalc/dataloader/readers/cansas_reader.py
r0615d54 r248ff73 130 130 self.current_datainfo.meta_data[PREPROCESS] = self.processing_instructions 131 131 self._parse_entry(entry) 132 self.send_to_output() # Combune datasets with DataInfo 132 has_error_dx = self.current_dataset.dx is not None 133 has_error_dy = self.current_dataset.dy is not None 134 self.remove_empty_q_values(has_error_dx=has_error_dx, 135 has_error_dy=has_error_dy) 136 self.send_to_output() # Combine datasets with DataInfo 137 self.current_datainfo = DataInfo() # Reset DataInfo 133 138 except FileContentsException as fc_exc: 134 139 # File doesn't meet schema - try loading with a less strict schema … … 215 220 self.current_dataset = plottable_1D(np.empty(0), np.empty(0), 216 221 np.empty(0), np.empty(0)) 217 self.current_dataset.dxl = np.empty(0)218 self.current_dataset.dxw = np.empty(0)219 222 self.base_ns = "{" + CANSAS_NS.get(self.cansas_version).get("ns") + "}" 220 223 … … 295 298 self.current_dataset.dx = np.append(self.current_dataset.dx, data_point) 296 299 elif tagname == 'dQw': 300 if self.current_dataset.dqw is None: self.current_dataset.dqw = np.empty(0) 297 301 self.current_dataset.dxw = np.append(self.current_dataset.dxw, data_point) 298 302 elif tagname == 'dQl': 303 if self.current_dataset.dxl is None: self.current_dataset.dxl = np.empty(0) 299 304 self.current_dataset.dxl = np.append(self.current_dataset.dxl, data_point) 300 305 elif tagname == 'Qmean':
Note: See TracChangeset
for help on using the changeset viewer.