pynrc.nrc_utils.bin_spectrum¶
- pynrc.nrc_utils.bin_spectrum(sp, wave, waveunits='um')[source]¶
Rebin spectrum
Rebin a
pysynphot.spectrum
to a different wavelength grid. This function first converts the input spectrum to units of counts then combines the photon flux onto the specified wavelength grid.Output spectrum units are the same as the input spectrum.
- Parameters
sp (
pysynphot.spectrum
) – Spectrum to rebin.wave (array_like) – Wavelength grid to rebin onto.
waveunits (str) – Units of wave input. Must be recognizeable by Pysynphot.
- Returns
pysynphot.spectrum
– Rebinned spectrum in same units as input spectrum.