S2MaskBandNames#

class S2MaskBandNames(value)[source]#

Bases: MaskBandNames

Sentinel-2 Mask Band names

classmethod convert_from(to_convert: list | str) list#

Convert from a list or a string to an enum instance

Parameters:

to_convert (Union[list, str]) – List or string to convert into an enum instance

Returns:

Converted list

Return type:

list

Example

>>> TsxPolarization.convert_from(["SINGLE", "S", TsxPolarization.QUAD])
[<TsxPolarization.SINGLE: 'S'>, <TsxPolarization.SINGLE: 'S'>, <TsxPolarization.QUAD: 'Q'>]
classmethod from_list(name_list: list | str) list#

Get the band enums from list of band names

>>> SarBandNames.from_list("VV")
[<SarBandNames.VV: 'VV'>]
Parameters:

name_list (Union[list, str]) – List of names

Returns:

List of enums

Return type:

list

classmethod from_value(val: Any) ListEnum#

Get the enum class from its value:

Parameters:

val (Any) – Value of the Enum

Returns:

Enum with value

Return type:

ListEnum

Example

>>> TsxPolarization.from_value("Q")
<TsxPolarization.QUAD: 'Q'>
classmethod list_names() list#

Get the name list of this enum:

Example

>>> TsxPolarization.list_values()
["SINGLE", "DUAL", "QUAD", "TWIN"]
classmethod list_values() list#

Get the value list of this enum

Example

>>> TsxPolarization.list_values()
["S", "D", "Q", "T"]
classmethod to_value_list(name_list: list | None = None) list#

Get a list from the values of the bands

 >>> SarBandNames.to_name_list([SarBandNames.HV_DSPK, SarBandNames.VV])
['HV_DSPK', 'VV']
>>> SarBandNames.to_name_list()
['VV', 'VV_DSPK', 'HH', 'HH_DSPK', 'VH', 'VH_DSPK', 'HV', 'HV_DSPK']
Parameters:

name_list (list) – List of band names

Returns:

List of band values

Return type:

list

ANC_DEG = 'MSK_QUALIT_ANC_DEG'#

Sentinel-2 mask (band 2 in MSK_QUALIT for processing baseline >= 04.00) - Ancillary degraded data

ANC_LOST = 'MSK_QUALIT_ANC_LOST'#

Sentinel-2 mask (band 1 in MSK_QUALIT for processing baseline >= 04.00) - Ancillary lost data

CIRRUS = 'MSK_CLASSI_CIRRUS'#

Sentinel-2 mask (band 2 in MSK_CLASSI for processing baseline >= 04.00) - Cirrus clouds

CLDPRB = 'CLDPRB'#

Sentinel-2 mask (L2A only) - Clouds probability (equals ‘CLOUDS_RAW’)

DEFECT = 'DEFECT'#

Sentinel-2 mask (band 5 in MSK_QUALIT for processing baseline >= 04.00) - Defective pixels

DETFOO = 'DETFOO'#

Sentinel-2 mask - Detectors footprint (Legacy)

MSI_DEG = 'MSK_QUALIT_MSI_DEG'#

Sentinel-2 mask (band 4 in MSK_QUALIT for processing baseline >= 04.00) - MSI degraded data

MSI_LOST = 'MSK_QUALIT_MSI_LOST'#

Sentinel-2 mask (band 3 in MSK_QUALIT for processing baseline >= 04.00) - MSI lost data

NODATA = 'NODATA'#

Sentinel-2 mask (band 6 and 7 in MSK_QUALIT for processing baseline >= 04.00) - Pixel nodata (inside the detectors)

OPAQUE = 'MSK_CLASSI_OPAQUE'#

Sentinel-2 mask (band 1 in MSK_CLASSI for processing baseline >= 04.00) - Opaque clouds

QT_DEFECTIVE_PIXELS = 'MSK_QUALIT_QT_DEFECTIVE_PIXELS'#

Sentinel-2 mask (band 5 in MSK_QUALIT for processing baseline >= 04.00) - Defective pixels (matching defective columns)

QT_NODATA_PIXELS = 'MSK_QUALIT_QT_NODATA_PIXELS'#

Sentinel-2 mask (band 6 in MSK_QUALIT for processing baseline >= 04.00) - No–data pixels

QT_PARTIALLY_CORRECTED_PIXELS = 'MSK_QUALIT_QT_PARTIALLY_CORRECTED_PIXELS'#

Sentinel-2 mask (band 7 in MSK_QUALIT for processing baseline >= 04.00) - Pixels partially corrected during cross-talk processing.

QT_SATURATED_PIXELS = 'MSK_QUALIT_QT_SATURATED_PIXELS'#

Sentinel-2 mask (band 8 in MSK_QUALIT for processing baseline >= 04.00) - Saturated pixels

SATURA = 'SATURA'#

Sentinel-2 mask (band 8 in MSK_QUALIT for processing baseline >= 04.00) - Saturated Pixels mask

SNOW_ICE = 'MSK_CLASSI_SNOW_ICE'#

Sentinel-2 mask (band 3 in MSK_CLASSI for processing baseline >= 04.00) - Snow and Ice areas

SNWPRB = 'SNWPRB'#

Sentinel-2 mask (L2A only) - Snow probability

TECQUA = 'TECQUA'#

Sentinel-2 mask - Technical quality mask