GalSim-developers/GalSim — pull request #575 by jmeyers314 (2014-07-01 19:13:25+00:00)
Title: #569 add small extrapolation tolerance to LookupTables

This PR is to modify the behavior of `LookupTable`s slightly so that round off error doesn't lead to TableErrors being thrown when attempting to evaluate a LookupTable right at it's minimum or maximum argument. This situation comes up occasionally in the chromatic code when integrating right to the edge of a filter or SED, especially if the filter or SED was defined using wavelengths in angstroms but is accessed using wavelengths in nanometers, or if the SED has been redshifted.

The old solution for the chromatic code was to make the allowed range of Bandpass or SED wavelengths slightly narrower than the corresponding LookupTable would actually support. A simpler solution, implemented here, is to allow `LookupTable`s to extrapolate a small distance past their nominal input domain.

I also made a few changes to SED and Bandpass related to the above change to LookupTable:
- removed most of the roundoff error guards in SED and Bandpass. I had to leave one in place in `SED.__call__`.
- redshifts are now handled by modifying the wavelengths passed to `SED.__call__`, instead of by wrapping old SEDs in lambda functions. This makes the `SED.atRedshift()` method simpler.
- related to the above, the SED.fphotons attribute has been replaced by the SED._rest_photons attribute.