eolearn.mask.snow_mask

Module for snow masking

class eolearn.mask.snow_mask.SnowMaskTask(data_feature, band_indices, ndsi_threshold=0.4, brightness_threshold=0.3, dilation_size=0, undefined_value=0, mask_name='SNOW_MASK')[source]

Bases: EOTask

The task calculates the snow mask using the given thresholds.

The default values were optimised based on the Sentinel-2 L1C processing level. Values might not be optimal for L2A processing level

Parameters:
  • data_feature (Feature) – EOPatch feature represented by a tuple in the form of (FeatureType, ‘feature_name’) containing the bands 2, 3, 7, 11, i.e. (FeatureType.DATA, ‘BANDS’)

  • band_indices (list[int]) – A list containing the indices at which the required bands can be found in the data_feature. The required bands are B03, B04, B08 and B11 and the indices should be provided in this order. If the ‘BANDS’ array contains all 13 L1C bands, then band_indices=[2, 3, 7, 11]. If the ‘BANDS’ are the 12 bands with L2A values, then band_indices=[2, 3, 7, 10]

  • ndsi_threshold (float) – Minimum value of the NDSI required to classify the pixel as snow

  • brightness_threshold (float) – Minimum value of the red band for a pixel to be classified as bright

  • dilation_size (int) –

  • undefined_value (int) –

  • mask_name (str) –

NDVI_THRESHOLD = 0.1
execute(eopatch)[source]

Override to specify action performed by task.

Parameters:

eopatch (EOPatch) –

Return type:

EOPatch