hypso.experimental.chlorophyll.utilities_chl module

hypso.experimental.chlorophyll.utilities_chl.convolve2d(slab, kernel, max_missing=0.5, verbose=True)

2D convolution with missings ignored

Parameters:
  • slab – 2d array. Input array to convolve. Can have numpy.nan or masked values.

  • kernel (ndarray) – 2d array, convolution kernel, must have sizes as odd numbers.

  • max_missing (float) – float in (0,1), max percentage of missing in each convolution window is tolerated before a missing is placed in the result.

  • verbose (bool) – Default to True.

Returns:

2d array, convolution result. Missings are represented as numpy.nans if they are in <slab>, or masked if they are masked in <slab>.

Return type:

ndarray