Spectral#

class hgrs.hgrs_kernel.Spectral(central_wl, fwhm)[source]#

Bases: object

static convolve2_(wl_signal, signal, wl, fwhm, expon=2.0, threshold=1e-06)[source]#

Convolution assuming Dirac for signal source spectral response :paral wl_signal: wavelength array of spectral signal :param signal: numpy of signal to convolve, coord=wl_signal :param wl: numpy of wavelength coordinates of signal :param fwhm: numpy with data=fwhm containing full width at half maximum in nm :param threshold: minimum values of the response function to be included in the convolution :return: numpy of convoluted signal

static convolve_(wl_signal, signal, wl, fwhm)[source]#

Convolution assuming Dirac for signal source spectral response :paral wl_signal: wavelength array of spectral signal :param signal: numpy of signal to convolve, coord=wl_signal :param wl: numpy of wavelength coordinates of signal :param fwhm: numpy with data=fwhm containing full width at half maximum in nm :return: numpy of convoluted signal

convolve(signal, name='signal', info={})[source]#

Convolve with spectral response of sensor based on full width at half maximum of each band :param signal: xarray spectral signal to convolve, coord=wl :param fwhm: xarray with data=fwhm containing full width at half maximum in nm, and coords=wl :param info: optional parameter to feed the attributes of the output xarray :return:

convolve2(signal, name='signal', expon=3, threshold=0.0001, info={})[source]#

Convolve with spectral response of sensor based on full width at half maximum of each band :param signal: xarray spectral signal to convolve, coord=wl :param fwhm: xarray with data=fwhm containing full width at half maximum in nm, and coords=wl :param info: optional parameter to feed the attributes of the output xarray :param threshold: minimum values of the response function to be included in the convolution :return: