|
All of the integrations of the filter fluxes, probability distributions, etc. are done using a simple implementation of the trapezoid rule. We interpolate the user-defined template SEDs (with arbitrary wavelength sampling) to a common (rest-frame) wavelength grid defined in the WAVELENGTH_FILE, using a robust interpolation algorithm that preserves flux, shown in Figure 1. In the figure, the black circles are the semi-regular wavelength points defined in the file specified by the WAVELENGTH_FILE parameter, and the red points are the midpoints of this wavelength grid. The blue points represent the (arbitrary) wavelength grid of a user-supplied template file, which, in the case of synthetic templates, is generally more finely sampled than the WAVELENGTH_FILE grid. We use the trapezoid rule (shaded blue regions) to integrate between the linear-interpolated midpoints and the adjascent template wavelength point, between the intervening template points, and finally between the last template wavelength point and the next midpoint. If there are no template points between the midpoints, we simply integrate between the midpoints. The inset shows two other simpler integration schemes that only integrate between the master grid points. If the curvature is significant between the master wavelength points, the interpolated flux can significantly under- or overestimate the true template fluxes. Systematic errors in the integrated template fluxes of order a few percent can result in systematic errors in the derived photometric redshifts.