Algo#

class hgrs.hgrs_kernel.Algo(l1c_obj=None, xcoarsen=20, ycoarsen=20, expon=2)[source]#

Bases: Product

static Gamma2sigma(Gamma)#

Function to convert FWHM (Gamma) to standard deviation (sigma)

static super_gaussian(x, amplitude=1.0, mu=0.0, sigma=1.0, expon=10.0)#

Super-Gaussian distribution: super_gaussian(x, amplitude, mu, sigma, expon) =

(amplitude/(sqrt(2*pi)*sigma)) * exp(-abs(x-mu)**expon / (2*sigma**expon))

Parameters:
  • x

  • amplitude

  • mu

  • sigma

  • expon

Returns:

static super_gaussian_fwhm2sigma(fwhm, expon)#

Function to convert FWHM to standard deviation (sigma) of the super-gaussian distribution :param fwhm: :param expon: :return:

get_omnicloudmask(rgnir)#

Apply OmniCloudMAsk for clouds and cloud shadows masking

Outputs:

0 = Clear 1 = Thick Cloud 2 = Thin Cloud 3 = Cloud Shadow

see DPIRD-DMA/OmniCloudMask

refs:

Wright, N., Duncan, J. M. A., Callow, J. N., Thompson, S. E., & George, R. J. (2025). Training sensor-agnostic deep learning models for remote sensing: Achieving state-of-the-art cloud and cloud shadow identification with OmniCloudMask. Remote Sensing of Environment, 322, 114694. https://doi.org/10.1016/J.RSE.2025.114694

Parameters:

rgnir – raster xarray object with the red, green and nir bands

Return omnimask:

raster of the retrieved mask

get_pressure(alt, psl)[source]#

Compute the pressure for a given altitude alt : altitude in meters (float or np.array) psl : pressure at sea level in hPa palt : pressure at the given altitude in hPa

water_vapor_correction(raster_name='coarse_masked_raster', variable='Rtoa')[source]#
Parameters:
  • raster_name

  • variable

Returns: