GalSim-developers/GalSim — pull request #530 by jmeyers314 (2014-04-12 07:13:05+00:00)
Title: #523 Somewhat unhelpful Bandpass error messages

I've added some try/except clauses as suggested, and a unit test. Bandpass and PowerSpectrum were pretty straight-forward, since for Bandpass all wavelengths should be valid test cases, and for PowerSpectrum, k=1.0 was already being tested so I decided it wouldn't hurt to test that again.

For SED, I decided to arbitrarily test at wavelength 700.0 nm, but then only trap NameErrors. These are the types that show up for the cases @barnabytprowe and @rmjarvis mentioned above. This allows things like ZeroDivisionErrors to pass, which is reasonable since these don't necessarily indicate an invalid spectrum for Bandpasses which don't cover 700 nm.

I also tweaked some error messages and minor 100-column cases.