count_input

jwst.combine_1d.combine1d.count_input(input_spectra)[source]

Determine the number of input spectra that cover each wavelength.

For any given input spectrum, the array of wavelengths gives the wavelengths at the centers of the pixels. In this context, the expression that an input spectrum “covers” some particular wavelength (typically not one of the elements in the input spectrum’s array of wavelengths) means that this wavelength is within the interval between the left edge of the first pixel and the right edge of the last pixel of the input spectrum.

Parameters:
input_spectralist of InputSpectrumModel

List of input spectra.

Returns:
wlndarray

Sorted list of all the wavelengths in all the input spectra.

n_input_spectrandarray, 1-D

For each element of wl, the corresponding element of n_input_spectra is the number of input spectra that cover the wavelength in wl.