Changeset c2525bf in sasview
- Timestamp:
- Sep 10, 2018 8:09:38 AM (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:
- 9dc1500
- Parents:
- 35ac8df
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/dataloader/readers/cansas_reader_HDF5.py
r96d06a4 rc2525bf 257 257 def process_2d_data_object(self, data_set, key, unit): 258 258 if key == self.i_name: 259 self.current_dataset.data = data_set 259 self.current_dataset.x_bins, self.current_dataset.y_bins = \ 260 data_set.shape 261 self.current_dataset.data = data_set.flatten() 260 262 self.current_dataset.zaxis("Intensity", unit) 261 263 elif key == self.i_uncertainties: 262 264 self.current_dataset.err_data = data_set.flatten() 263 265 elif key in self.q_name: 264 self.current_dataset.xaxis("Q", unit) 265 self.current_dataset.yaxis("Q", unit) 266 #FIXME: This is broken - need to properly handle 2D data 267 # TODO: Check shape of array (2d - cash money, homey!) 268 # TODO: 3D - check dims, etc. 269 # TODO: Put data where it belongs 270 pass 266 self.current_dataset.xaxis("Q_x", unit) 267 self.current_dataset.yaxis("Q_y", unit) 268 if self.q_name[0] == self.q_name[1]: 269 # All q data in a single array 270 self.current_dataset.qx_data = data_set[0].flatten() 271 self.current_dataset.qy_data = data_set[1].flatten() 272 elif self.q_name.index(key) == 0: 273 self.current_dataset.qx_data = data_set.flatten() 274 elif self.q_name.index(key) == 1: 275 self.current_dataset.qy_data = data_set.flatten() 271 276 elif key in self.q_uncertainties or key in self.q_resolutions: 272 # FIXME: This isn't right either. 273 # TODO: find resolution/uncertainty specific to q_name 274 pass 277 if ((self.q_uncertainties[0] == self.q_uncertainties[1]) or 278 (self.q_resolutions[0] == self.q_resolutions[1])): 279 # All q data in a single array 280 self.current_dataset.dqx_data = data_set[0].flatten() 281 self.current_dataset.dqy_data = data_set[1].flatten() 282 elif (self.q_uncertainties.index(key) == 0 or 283 self.q_resolutions.index(key) == 0): 284 self.current_dataset.dqx_data = data_set.flatten() 285 elif (self.q_uncertainties.index(key) == 1 or 286 self.q_resolutions.index(key) == 1): 287 self.current_dataset.dqy_data = data_set.flatten() 288 self.current_dataset.yaxis("Q_y", unit) 289 elif key == self.mask_name: 290 self.current_dataset.mask = data_set.flatten() 275 291 elif key == u'Qy': 276 292 self.current_dataset.yaxis("Q_y", unit)
Note: See TracChangeset
for help on using the changeset viewer.