hypso.processing.toa#

L1B to L1C: top-of-atmosphere radiance to reflectance.

The L1C tree also carries metadata/srf (per-band spectral response functions, solar irradiance and Earth-Sun distance, from hypso.srf.srf_dataset()) for readers that convert radiance themselves, such as Polymer. The spectral response and solar spectra are in hypso.srf.

Functions#

l1b_to_l1c(tree[, use_direct_georef, ssi_source, ...])

Top-of-atmosphere reflectance rhot from a georeferenced L1B tree.

spectral_response(tree[, ssi_source, use_unbinned])

The SpectralResponse of a calibrated tree's bands.

srf_node(tree[, ssi_source, use_unbinned])

The metadata/srf group for a calibrated tree, computed (not read from it).

toa_reflectance(radiance, f0, iso_time, solar_zenith)

Top-of-atmosphere reflectance from radiance.

Module Contents#

hypso.processing.toa.l1b_to_l1c(tree, use_direct_georef=False, ssi_source='tsis', use_unbinned=True)[source]#

Top-of-atmosphere reflectance rhot from a georeferenced L1B tree.

Parameters:
  • tree (xarray.DataTree) – Georeferenced L1B product tree (sensor geometry or gridded).

  • use_direct_georef (bool, default False) – Use solar_zenith_direct instead of solar_zenith, when present.

  • ssi_source ({"tsis", "thuillier"}, default "tsis") – Solar irradiance spectrum: TSIS-1 HSRS or Thuillier (2002).

  • use_unbinned (bool, default True) – Build the spectral response functions from the unbinned wavelengths and bin them, instead of from the binned band centres.

Returns:

L1C tree with metadata/srf.

Return type:

xarray.DataTree

hypso.processing.toa.spectral_response(tree, ssi_source='tsis', use_unbinned=True)[source]#

The SpectralResponse of a calibrated tree’s bands.

Spectral response functions, solar irradiance and effective FWHM: what L1C reflectance and metadata/srf use.

Parameters:
hypso.processing.toa.srf_node(tree, ssi_source='tsis', use_unbinned=True)[source]#

The metadata/srf group for a calibrated tree, computed (not read from it).

Parameters:
Return type:

xarray.Dataset

hypso.processing.toa.toa_reflectance(radiance, f0, iso_time, solar_zenith)[source]#

Top-of-atmosphere reflectance from radiance.

rho = pi L d^2 / (F0 cos(sza)), with d the Earth-Sun distance in AU (Normalized reflectances).

Parameters:
  • radiance (numpy.ndarray) – (lines, samples, bands) radiance in W m-2 um-1 sr-1.

  • f0 (array_like) – Per-band solar irradiance F0 in mW m-2 nm-1 (numerically equal to W m-2 um-1).

  • iso_time (str) – Acquisition time (ISO 8601), for the Earth-Sun distance.

  • solar_zenith (numpy.ndarray) – (lines, samples) solar zenith angle in degrees.

Returns:

Reflectance, in the radiance’s dtype.

Return type:

numpy.ndarray