def convolve(self, lam, flux):
'''
Convolve flux with normalized filter throughput.
:param array_like lam: High-res wavelength grid [:math:`\mu \mathrm{m}`]
:param array_like flux: High-res flux grid \
[:math:`\mathrm{W/m}^2 / \mu \mathrm{m}`]
:returns array_like F: Flux convolved with normalized throughput
'''
# interpolate filter throughout to HR grid
T = np.interp(lam, self.wl, self.throughput)
# Convolve with normalized throughput
F = np.sum(flux * T) / np.sum(T)
return F
评论列表
文章目录