Changeset 02c1608e in sasview
- Timestamp:
- Jul 9, 2018 2:02:07 PM (6 years ago)
- Branches:
- master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, unittest-saveload
- Children:
- 369ed11d
- Parents:
- f5483ef
- Location:
- src/sas
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/dataloader/readers/cansas_reader_HDF5.py
rcf820f5 r02c1608e 105 105 self.i_name = u'' 106 106 self.i_node = u'' 107 self.q_uncertainties = u''108 self.q_resolutions = u''107 self.q_uncertainties = [] 108 self.q_resolutions = [] 109 109 self.i_uncertainties = u'' 110 110 self.parent_class = u'' … … 246 246 else: 247 247 self.current_dataset.x = data_set.flatten() 248 elif key in self.q_resolutions: 249 if key == u'dQw': 248 elif key in self.q_uncertainties or key in self.q_resolutions: 249 if (len(self.q_resolutions) > 1 250 and np.where(self.q_resolutions == key)[0] == 0): 250 251 self.current_dataset.dxw = data_set.flatten() 251 elif key == u'dQl': 252 elif (len(self.q_resolutions) > 1 253 and np.where(self.q_resolutions == key)[0] == 1): 252 254 self.current_dataset.dxl = data_set.flatten() 253 255 else: … … 553 555 self.i_node = "" 554 556 self.q_name = [] 555 self.q_uncertainties = ""556 self.q_resolutions = ""557 self.q_uncertainties = [] 558 self.q_resolutions = [] 557 559 self.i_uncertainties = "" 558 560 … … 582 584 if item in keys: 583 585 q_vals = value.get(item) 584 self.q_uncertainties = q_vals.attrs.get("uncertainties") 585 if self.q_uncertainties is None: 586 if q_vals.attrs.get("uncertainties"): 587 self.q_uncertainties = q_vals.attrs.get("uncertainties") 588 elif q_vals.attrs.get("uncertainty"): 586 589 self.q_uncertainties = q_vals.attrs.get("uncertainty") 587 self.q_resolutions = q_vals.attrs.get("resolutions") 590 if isinstance(self.q_uncertainties, str): 591 self.q_uncertainties = [self.q_uncertainties] 592 if q_vals.attrs.get("resolutions"): 593 self.q_resolutions = q_vals.attrs.get("resolutions") 594 if isinstance(self.q_resolutions, str): 595 self.q_resolutions = [self.q_resolutions] 588 596 if self.i_name in keys: 589 597 i_vals = value.get(self.i_name) -
src/sas/sasgui/guiframe/local_perspectives/data_loader/data_loader.py
r2924532 r02c1608e 239 239 self.load_complete(output=output, message="Loading data complete!", 240 240 info="info") 241 else:242 self.load_complete(output=None, message=error_message, info="error")243 241 244 242 def load_update(self, message="", info="warning"):
Note: See TracChangeset
for help on using the changeset viewer.