Changeset 574adc7 in sasview for src/sas/sascalc/calculator/instrument.py
- Timestamp:
- Sep 22, 2017 2:01:32 PM (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, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 34d7b35
- Parents:
- 9706d88
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/calculator/instrument.py
r9a5097c r574adc7 222 222 """ 223 223 # check if the wavelength is in range 224 if min(band) < self.min or\ 225 max(band) > self.max: 226 raise 224 if min(band) < self.min or max(band) > self.max: 225 raise ValueError("band out of range") 227 226 self.band = band 228 227 … … 239 238 """ 240 239 # check if the wavelength is in range 241 if wavelength < min(self.band) or\ 242 wavelength > max(self.band): 243 raise 240 if wavelength < min(self.band) or wavelength > max(self.band): 241 raise ValueError("wavelength out of range") 244 242 self.wavelength = wavelength 245 243 validate(wavelength) … … 324 322 plt.show() 325 323 except: 326 raise RuntimeError , "Can't import matplotlib required to plot..."324 raise RuntimeError("Can't import matplotlib required to plot...") 327 325 328 326
Note: See TracChangeset
for help on using the changeset viewer.