Changeset b1ec23d in sasview for src/sas/sascalc
- Timestamp:
- Oct 17, 2018 9:07:51 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:
- b204004
- Parents:
- 5218180
- Location:
- src/sas/sascalc/dataloader
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/dataloader/file_reader_base_class.py
r8d5e11c rb1ec23d 231 231 data.mask = data.mask.astype(dtype=bool) 232 232 233 if len(data.data.shape) == 2: 234 n_rows, n_cols = data.data.shape 235 data.y_bins = data.qy_data[0::int(n_cols)] 236 data.x_bins = data.qx_data[:int(n_cols)] 237 data.data = data.data.flatten() 238 data = self._remove_nans_in_data(data) 233 n_rows, n_cols = data.data.shape 234 data.y_bins = data.qy_data[0::int(n_cols)] 235 data.x_bins = data.qx_data[:int(n_cols)] 236 data.data = data.data.flatten() 237 data = self._remove_nans_in_data(data) 239 238 if len(data.data) > 0: 240 239 data.xmin = np.min(data.qx_data) … … 288 287 :return: 289 288 """ 290 data.xaxis( "\\rm{Q}", '1/A')291 data.yaxis( "\\rm{Intensity}", "1/cm")289 data.xaxis(r"\rm{Q}", '1/A') 290 data.yaxis(r"\rm{Intensity}", "1/cm") 292 291 return data 293 292 -
src/sas/sascalc/dataloader/loader.py
r8d5e11c rb1ec23d 367 367 try: 368 368 return fn(path, data) 369 except Exception as exep: 370 pass # give other loaders a chance to succeed 371 # If we get here it is because all loaders failed 372 raise exep # raises last exception 369 except Exception as exc: 370 msg = "Saving file {} using the {} writer failed.\n".format( 371 path, type(fn).__name__) 372 msg += str(exc) 373 logger.exception(msg) # give other loaders a chance to succeed 373 374 374 375
Note: See TracChangeset
for help on using the changeset viewer.