Changeset 5ae40e7 in sasview for src/sas/sascalc/dataloader/readers
- Timestamp:
- Apr 9, 2017 5:08:48 AM (8 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:
- f344f6c
- Parents:
- 10ab40e
- git-author:
- Adam Washington <adam.washington@…> (04/09/17 05:01:01)
- git-committer:
- Adam Washington <adam.washington@…> (04/09/17 05:08:48)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/dataloader/readers/sesans_reader.py
r10ab40e r5ae40e7 51 51 _, extension = os.path.splitext(basename) 52 52 if not (self.allow_all or extension.lower() in self.ext): 53 raise RuntimeError("{} has an unrecognized file extension".format(path)) 53 raise RuntimeError( 54 "{} has an unrecognized file extension".format(path)) 54 55 else: 55 raise Run etimeError("{} is not a file".format(path))56 raise RuntimeError("{} is not a file".format(path)) 56 57 with open(path, 'r') as input_f: 57 58 # Read in binary mode since GRASP frequently has no-ascii … … 70 71 if "Wavelength_unit" not in self.params: 71 72 raise RuntimeError("Wavelength has no units") 73 if params["SpinEchoLength_unit"] != params["Wavelength_unit"]: 74 raise RuntimeError("The spin echo data has rudely used " 75 "different units for the spin echo length " 76 "and the wavelength. While sasview could " 77 "handle this instance, it is a violation " 78 "of the file format and will not be " 79 "handled by other software.") 72 80 73 81 headers = input_f.readline().split()
Note: See TracChangeset
for help on using the changeset viewer.