hypso.srf.response#
Spectral response of HYPSO’s bands: Gaussian spectral response functions (SRFs) per unbinned band, sampled on the solar irradiance spectrum’s wavelength grid and binned like the image; and what follows from them - per-band solar irradiance (F0) and effective FWHM.
compute_spectral_response() builds all of it into one SpectralResponse; srf_dataset() turns that into a product’s metadata/srf group.
Classes#
SRFs and what is derived from them. Shapes: n_bands = binned band |
Functions#
|
Per-band solar irradiance F0: the irradiance averaged with |
|
Sum each group of bin_factor neighbouring SRFs and renormalise to a |
|
Spectral response of a sensor's bands. |
|
Width (nm) of each SRF at half its maximum. |
|
One Gaussian SRF (peak 1, +/- |
|
A product's |
Module Contents#
- class hypso.srf.response.SpectralResponse[source]#
SRFs and what is derived from them. Shapes: n_bands = binned band count, n_unbinned = pre-binning band count, n_grid = wavelength grid.
- hypso.srf.response.band_irradiance(srfs, ssi)[source]#
Per-band solar irradiance F0: the irradiance averaged with each band’s SRF as weights.
- Parameters:
srfs (scipy.sparse.csr_matrix)
- Return type:
- hypso.srf.response.bin_srfs(srfs, bin_factor)[source]#
Sum each group of bin_factor neighbouring SRFs and renormalise to a peak of 1 (extra bands beyond a whole number of bins are dropped).
- Parameters:
srfs (scipy.sparse.csr_matrix)
bin_factor (int)
- Return type:
scipy.sparse.csr_matrix
- hypso.srf.response.compute_spectral_response(band_centers_unbinned, fwhm_unbinned, bin_factor, ssi_source='tsis')[source]#
Spectral response of a sensor’s bands.
- Parameters:
band_centers_unbinned (array_like) – Band centres and FWHM in nm before spectral binning.
fwhm_unbinned (array_like) – Band centres and FWHM in nm before spectral binning.
bin_factor (int) – Spectral binning factor of the image.
ssi_source ({"tsis", "thuillier"}, default "tsis") – Solar irradiance spectrum for the per-band F0.
- Return type:
- hypso.srf.response.effective_fwhm(srfs, wavelengths)[source]#
Width (nm) of each SRF at half its maximum.
- Parameters:
srfs (scipy.sparse.csr_matrix)
- Return type:
- hypso.srf.response.gaussian_srfs(ssi, solar_wavelengths, sensor_wavelengths, sensor_fwhm)[source]#
One Gaussian SRF (peak 1, +/-
SRF_N_SIGMAsigma) per band on the irradiance spectrum’s wavelength grid, truncated to the first band’s start and the last band’s end. Returns (srfs as sparse CSR, truncated irradiance, truncated wavelengths).
- hypso.srf.response.srf_dataset(sr, wavelengths, fwhm, iso_time=None, band_indices=None)[source]#
A product’s
metadata/srfgroup.- Parameters:
sr (SpectralResponse)
wavelengths (array_like) – The product’s band centres and FWHM (nm).
fwhm (array_like) – The product’s band centres and FWHM (nm).
iso_time (str, optional) – Acquisition time, for
earth_sun_distance_au.band_indices (array_like of int, optional) – Each band’s index in
sr(the sensor’s full band set), for a product with a subset of bands (Product.select_bands); default0..n-1. The per-band tables andBand_<index>SRFs follow it.
- Returns:
F0,F0_wavelengths,effective_fwhm(_unbinned), and oneBand_<i>variable per band (the non-zero part of its binned SRF, on its ownwav_Band_<i>coordinate). Polymer reads its SRFs from here (hypso.ac.ac_polymer.ac_polymer_srf_getter_from_l1()).- Return type: