apply_response_functions#

exo_skryer.instru_convolve.apply_response_functions(spectrum: Array) Array[source]#

Apply instrument response functions to convolve spectrum onto observational bins.

This function takes a high-resolution model spectrum and convolves it with pre-loaded instrument response functions to produce a binned spectrum matching the observational wavelength grid. The response functions (boxcar, Gaussian, filter throughput curves, etc.) are retrieved from the bandpass registry.

For boxcar bins, the integration is simple averaging:

F_bin[i] = ∫ F(λ) dλ / ∫ dλ

For filter curve bins (non-boxcar), the integration is photon-weighted:

F_bin[i] = ∫ F(λ) T(λ) λ dλ / ∫ T(λ) λ dλ

Parameters:
spectrumndarray, shape (nwl_hi,)

High-resolution model spectrum evaluated on the master wavelength grid. This should be the output from a radiative transfer calculation.

Returns:
binned_spectrumndarray, shape (nbin,)

Convolved spectrum in observational bins.

If no bins are registered (nbin=0), returns an empty array with the same dtype as spectrum.