Indices#

sen2chain.indices.Ndvi(l2a_product_object, ...)

\[NDVI = {{NIR-VIR}\over{NIR+VIR}}\]

sen2chain.indices.NdwiMcf(...)

\[NDWI(McFeeters) = {{GREEN-NIR}\over{GREEN+NIR}}\]

sen2chain.indices.NdwiGao(...)

\[NDWI(Gao) = {{NIR-SWIR}\over{NIR+SWIR}}\]

sen2chain.indices.Mndwi(l2a_product_object, ...)

\[MNDWI = {{GREEN-SWIR}\over{GREEN+SWIR}}\]

sen2chain.indices.Ndre(l2a_product_object, ...)

\[NDRE = {{NIR-RedEdge}\over{NIR+RedEdge}}\]

sen2chain.indices.IRECI(l2a_product_object, ...)

\[IRECI = {{NIR-R}\over{RE1/RE2}}\]

sen2chain.indices.BIGR(l2a_product_object, ...)

\[Brightness\,Index\,Green\,Red = \sqrt{ {GREEN^{2}+ RED^{2}}\over{2}}\]

sen2chain.indices.BIRNIR(l2a_product_object, ...)

\[Brightness\,Index\,Red\,Near\,InfraRed = \sqrt{ {RED^{2} + NIR^{2}}\over{2} }\]

sen2chain.indices.BIBG(l2a_product_object, ...)

\[Brightness\,Index\,Blue\,Green = \sqrt{{BLUE^{2} + GREEN^{2}}\over{2}}\]

sen2chain.indices.NBR(l2a_product_object, ...)

\[Normalized\,Burn\,Ratio = {{NIR-SWIR}\over{NIR+SWIR}}\]

sen2chain.indices.EVI(l2a_product_object, ...)

\[Enhanced\,Vegetation\,Index = {2.5 * {( NIR - RED )}\over{( NIR + 6 * RED - 7.5 * BLUE ) + 1}}\]


NDVI#

class sen2chain.indices.Ndvi(l2a_product_object, cm_product_object)#

\[NDVI = {{NIR-VIR}\over{NIR+VIR}}\]

NIR: band 08 (10m) VIR: band 04 (10m)

process_indice(out_path: PosixPath, reprocess: bool = False, nodata_clouds: bool = False, quicklook: bool = False, baseline: str = '4.0') None#

Process NDVI :param out_path: Path to computed indice :type out_path: Path :param reprocess: When True, delete existing indice and process new one :type reprocess: bool, Default to False :param nodata_clouds: When True, mask indice with cloud mask. :type nodata_clouds: bool, Default to False :param quicklook: When True, process indice quicklook :type quicklook: bool, Default to True :param baseline: L2A Product baseline. Needed to compute the right indice formula. :type baseline: str


NDWIMCF#

class sen2chain.indices.NdwiMcf(l2a_product_object, cm_product_object)#

\[NDWI(McFeeters) = {{GREEN-NIR}\over{GREEN+NIR}}\]

GREEN: band 03 NIR: band 08

process_indice(out_path: PosixPath, reprocess: bool = False, nodata_clouds: bool = False, quicklook: bool = False, baseline: str = '4.0') None#

Process NDWIMCF

Parameters:
  • out_path (Path) – Path to computed indice

  • reprocess (bool, Default to False) – When True, delete existing indice and process new one

  • nodata_clouds (bool, Default to False) – When True, mask indice with cloud mask.

  • quicklook (bool, Default to True) – When True, process indice quicklook

  • baseline (str) – L2A Product baseline. Needed to compute the right indice formula.


NDWIGAO#

class sen2chain.indices.NdwiGao(l2a_product_object, cm_product_object)#

\[NDWI(Gao) = {{NIR-SWIR}\over{NIR+SWIR}}\]

NIR: band 08 SWIR: band 11

Also called NDMI

process_indice(out_path: PosixPath, reprocess: bool = False, nodata_clouds: bool = False, quicklook: bool = False, baseline: str = '4.0') None#

Process NDWIGAO

Parameters:
  • out_path (Path) – Path to computed indice

  • reprocess (bool, Default to False) – When True, delete existing indice and process new one

  • nodata_clouds (bool, Default to False) – When True, mask indice with cloud mask.

  • quicklook (bool, Default to True) – When True, process indice quicklook

  • baseline (str) – L2A Product baseline. Needed to compute the right indice formula.


MNDWI#

class sen2chain.indices.Mndwi(l2a_product_object, cm_product_object)#

\[MNDWI = {{GREEN-SWIR}\over{GREEN+SWIR}}\]

GREEN: band 03 SWIR: band 11

process_indice(out_path: PosixPath, reprocess: bool = False, nodata_clouds: bool = False, quicklook: bool = False, baseline: str = '4.0') None#

Process MNDWI

Parameters:
  • out_path (Path) – Path to computed indice

  • reprocess (bool, Default to False) – When True, delete existing indice and process new one

  • nodata_clouds (bool, Default to False) – When True, mask indice with cloud mask.

  • quicklook (bool, Default to True) – When True, process indice quicklook

  • baseline (str) – L2A Product baseline. Needed to compute the right indice formula.


NDRE#

class sen2chain.indices.Ndre(l2a_product_object, cm_product_object)#

\[NDRE = {{NIR-RedEdge}\over{NIR+RedEdge}}\]

NIR: band 08 RedEdge: band 05

process_indice(out_path: PosixPath, reprocess: bool = False, nodata_clouds: bool = False, quicklook: bool = False, baseline: str = '4.0') None#

Process NDRE

Parameters:
  • out_path (Path) – Path to computed indice

  • reprocess (bool, Default to False) – When True, delete existing indice and process new one

  • nodata_clouds (bool, Default to False) – When True, mask indice with cloud mask.

  • quicklook (bool, Default to True) – When True, process indice quicklook

  • baseline (str) – L2A Product baseline. Needed to compute the right indice formula.


IRECI#

class sen2chain.indices.IRECI(l2a_product_object, cm_product_object)#

\[IRECI = {{NIR-R}\over{RE1/RE2}}\]

NIR: band 783nm (B7 - 20m) R: band 665nm (B4 - 10m) RE1: band 705nm (B5 - 20m) RE2: band 740nm (B6 - 20m)

process_indice(out_path: PosixPath, reprocess: bool = False, nodata_clouds: bool = False, quicklook: bool = False, baseline: str = '4.0') None#

Process IRECI

Parameters:
  • out_path (Path) – Path to computed indice

  • reprocess (bool, Default to False) – When True, delete existing indice and process new one

  • nodata_clouds (bool, Default to False) – When True, mask indice with cloud mask.

  • quicklook (bool, Default to True) – When True, process indice quicklook

  • baseline (str) – L2A Product baseline. Needed to compute the right indice formula.


BIGR#

class sen2chain.indices.BIGR(l2a_product_object, cm_product_object)#

\[Brightness\,Index\,Green\,Red = \sqrt{ {GREEN^{2}+ RED^{2}}\over{2}}\]

GREEN: band 03 RED: band 04

process_indice(out_path: PosixPath, reprocess: bool = False, nodata_clouds: bool = False, quicklook: bool = False, baseline: str = '4.0') None#

Process BIGR

Parameters:
  • out_path (Path) – Path to computed indice

  • reprocess (bool, Default to False) – When True, delete existing indice and process new one

  • nodata_clouds (bool, Default to False) – When True, mask indice with cloud mask.

  • quicklook (bool, Default to True) – When True, process indice quicklook

  • baseline (str) – L2A Product baseline. Needed to compute the right indice formula.


BIRNIR#

class sen2chain.indices.BIRNIR(l2a_product_object, cm_product_object)#

\[Brightness\,Index\,Red\,Near\,InfraRed = \sqrt{ {RED^{2} + NIR^{2}}\over{2} }\]

NIR: band 08 RED: band 04

process_indice(out_path: PosixPath, reprocess: bool = False, nodata_clouds: bool = False, quicklook: bool = False, baseline: str = '4.0') None#

Process BIRNIR

Parameters:
  • out_path (Path) – Path to computed indice

  • reprocess (bool, Default to False) – When True, delete existing indice and process new one

  • nodata_clouds (bool, Default to False) – When True, mask indice with cloud mask.

  • quicklook (bool, Default to True) – When True, process indice quicklook

  • baseline (str) – L2A Product baseline. Needed to compute the right indice formula.


BIBG#

class sen2chain.indices.BIBG(l2a_product_object, cm_product_object)#

\[Brightness\,Index\,Blue\,Green = \sqrt{{BLUE^{2} + GREEN^{2}}\over{2}}\]

BLUE: band 02 GREEN: band 03

process_indice(out_path: PosixPath, reprocess: bool = False, nodata_clouds: bool = False, quicklook: bool = False, baseline: str = '4.0') None#

Process BIBG

Parameters:
  • out_path (Path) – Path to computed indice

  • reprocess (bool, Default to False) – When True, delete existing indice and process new one

  • nodata_clouds (bool, Default to False) – When True, mask indice with cloud mask.

  • quicklook (bool, Default to True) – When True, process indice quicklook

  • baseline (str) – L2A Product baseline. Needed to compute the right indice formula.


EVI#

class sen2chain.indices.EVI(l2a_product_object, cm_product_object)#

\[Enhanced\,Vegetation\,Index = {2.5 * {( NIR - RED )}\over{( NIR + 6 * RED - 7.5 * BLUE ) + 1}}\]

BLUE: band 02 RED: band 04 NIR: band 08

process_indice(out_path: PosixPath, reprocess: bool = False, nodata_clouds: bool = False, quicklook: bool = False, baseline: str = '4.0') None#

Process EVI

Parameters:
  • out_path (Path) – Path to computed indice

  • reprocess (bool, Default to False) – When True, delete existing indice and process new one

  • nodata_clouds (bool, Default to False) – When True, mask indice with cloud mask.

  • quicklook (bool, Default to True) – When True, process indice quicklook

  • baseline (str) – L2A Product baseline. Needed to compute the right indice formula.


Module for defining radiometric indices.

class sen2chain.indices.Indice#

Indice abstract base class. Every indice class must implement these class attributes and object methods.

  • _name: Name of the indice. Must be unique and without spaces.

  • _filename_template: Template of the indice filename output. Will be

    filled with the product’s identifier and the file extension e.g.: {product_identifier}_INDICE_NAME{ext}

  • _ext: Extension of the indice filename. (eg: “.tif”, “.jp2”)

process_indice(out_path, nodata_clouds, quicklook):

class sen2chain.indices.Ndvi(l2a_product_object, cm_product_object)#

\[NDVI = {{NIR-VIR}\over{NIR+VIR}}\]

NIR: band 08 (10m) VIR: band 04 (10m)

process_indice(out_path: PosixPath, reprocess: bool = False, nodata_clouds: bool = False, quicklook: bool = False, baseline: str = '4.0') None#

Process NDVI :param out_path: Path to computed indice :type out_path: Path :param reprocess: When True, delete existing indice and process new one :type reprocess: bool, Default to False :param nodata_clouds: When True, mask indice with cloud mask. :type nodata_clouds: bool, Default to False :param quicklook: When True, process indice quicklook :type quicklook: bool, Default to True :param baseline: L2A Product baseline. Needed to compute the right indice formula. :type baseline: str

class sen2chain.indices.NdwiMcf(l2a_product_object, cm_product_object)#

\[NDWI(McFeeters) = {{GREEN-NIR}\over{GREEN+NIR}}\]

GREEN: band 03 NIR: band 08

process_indice(out_path: PosixPath, reprocess: bool = False, nodata_clouds: bool = False, quicklook: bool = False, baseline: str = '4.0') None#

Process NDWIMCF

Parameters:
  • out_path (Path) – Path to computed indice

  • reprocess (bool, Default to False) – When True, delete existing indice and process new one

  • nodata_clouds (bool, Default to False) – When True, mask indice with cloud mask.

  • quicklook (bool, Default to True) – When True, process indice quicklook

  • baseline (str) – L2A Product baseline. Needed to compute the right indice formula.

class sen2chain.indices.NdwiGao(l2a_product_object, cm_product_object)#

\[NDWI(Gao) = {{NIR-SWIR}\over{NIR+SWIR}}\]

NIR: band 08 SWIR: band 11

Also called NDMI

process_indice(out_path: PosixPath, reprocess: bool = False, nodata_clouds: bool = False, quicklook: bool = False, baseline: str = '4.0') None#

Process NDWIGAO

Parameters:
  • out_path (Path) – Path to computed indice

  • reprocess (bool, Default to False) – When True, delete existing indice and process new one

  • nodata_clouds (bool, Default to False) – When True, mask indice with cloud mask.

  • quicklook (bool, Default to True) – When True, process indice quicklook

  • baseline (str) – L2A Product baseline. Needed to compute the right indice formula.

class sen2chain.indices.Mndwi(l2a_product_object, cm_product_object)#

\[MNDWI = {{GREEN-SWIR}\over{GREEN+SWIR}}\]

GREEN: band 03 SWIR: band 11

process_indice(out_path: PosixPath, reprocess: bool = False, nodata_clouds: bool = False, quicklook: bool = False, baseline: str = '4.0') None#

Process MNDWI

Parameters:
  • out_path (Path) – Path to computed indice

  • reprocess (bool, Default to False) – When True, delete existing indice and process new one

  • nodata_clouds (bool, Default to False) – When True, mask indice with cloud mask.

  • quicklook (bool, Default to True) – When True, process indice quicklook

  • baseline (str) – L2A Product baseline. Needed to compute the right indice formula.

class sen2chain.indices.Ndre(l2a_product_object, cm_product_object)#

\[NDRE = {{NIR-RedEdge}\over{NIR+RedEdge}}\]

NIR: band 08 RedEdge: band 05

process_indice(out_path: PosixPath, reprocess: bool = False, nodata_clouds: bool = False, quicklook: bool = False, baseline: str = '4.0') None#

Process NDRE

Parameters:
  • out_path (Path) – Path to computed indice

  • reprocess (bool, Default to False) – When True, delete existing indice and process new one

  • nodata_clouds (bool, Default to False) – When True, mask indice with cloud mask.

  • quicklook (bool, Default to True) – When True, process indice quicklook

  • baseline (str) – L2A Product baseline. Needed to compute the right indice formula.

class sen2chain.indices.IRECI(l2a_product_object, cm_product_object)#

\[IRECI = {{NIR-R}\over{RE1/RE2}}\]

NIR: band 783nm (B7 - 20m) R: band 665nm (B4 - 10m) RE1: band 705nm (B5 - 20m) RE2: band 740nm (B6 - 20m)

process_indice(out_path: PosixPath, reprocess: bool = False, nodata_clouds: bool = False, quicklook: bool = False, baseline: str = '4.0') None#

Process IRECI

Parameters:
  • out_path (Path) – Path to computed indice

  • reprocess (bool, Default to False) – When True, delete existing indice and process new one

  • nodata_clouds (bool, Default to False) – When True, mask indice with cloud mask.

  • quicklook (bool, Default to True) – When True, process indice quicklook

  • baseline (str) – L2A Product baseline. Needed to compute the right indice formula.

class sen2chain.indices.BIGR(l2a_product_object, cm_product_object)#

\[Brightness\,Index\,Green\,Red = \sqrt{ {GREEN^{2}+ RED^{2}}\over{2}}\]

GREEN: band 03 RED: band 04

process_indice(out_path: PosixPath, reprocess: bool = False, nodata_clouds: bool = False, quicklook: bool = False, baseline: str = '4.0') None#

Process BIGR

Parameters:
  • out_path (Path) – Path to computed indice

  • reprocess (bool, Default to False) – When True, delete existing indice and process new one

  • nodata_clouds (bool, Default to False) – When True, mask indice with cloud mask.

  • quicklook (bool, Default to True) – When True, process indice quicklook

  • baseline (str) – L2A Product baseline. Needed to compute the right indice formula.

class sen2chain.indices.BIRNIR(l2a_product_object, cm_product_object)#

\[Brightness\,Index\,Red\,Near\,InfraRed = \sqrt{ {RED^{2} + NIR^{2}}\over{2} }\]

NIR: band 08 RED: band 04

process_indice(out_path: PosixPath, reprocess: bool = False, nodata_clouds: bool = False, quicklook: bool = False, baseline: str = '4.0') None#

Process BIRNIR

Parameters:
  • out_path (Path) – Path to computed indice

  • reprocess (bool, Default to False) – When True, delete existing indice and process new one

  • nodata_clouds (bool, Default to False) – When True, mask indice with cloud mask.

  • quicklook (bool, Default to True) – When True, process indice quicklook

  • baseline (str) – L2A Product baseline. Needed to compute the right indice formula.

class sen2chain.indices.BIBG(l2a_product_object, cm_product_object)#

\[Brightness\,Index\,Blue\,Green = \sqrt{{BLUE^{2} + GREEN^{2}}\over{2}}\]

BLUE: band 02 GREEN: band 03

process_indice(out_path: PosixPath, reprocess: bool = False, nodata_clouds: bool = False, quicklook: bool = False, baseline: str = '4.0') None#

Process BIBG

Parameters:
  • out_path (Path) – Path to computed indice

  • reprocess (bool, Default to False) – When True, delete existing indice and process new one

  • nodata_clouds (bool, Default to False) – When True, mask indice with cloud mask.

  • quicklook (bool, Default to True) – When True, process indice quicklook

  • baseline (str) – L2A Product baseline. Needed to compute the right indice formula.

class sen2chain.indices.EVI(l2a_product_object, cm_product_object)#

\[Enhanced\,Vegetation\,Index = {2.5 * {( NIR - RED )}\over{( NIR + 6 * RED - 7.5 * BLUE ) + 1}}\]

BLUE: band 02 RED: band 04 NIR: band 08

process_indice(out_path: PosixPath, reprocess: bool = False, nodata_clouds: bool = False, quicklook: bool = False, baseline: str = '4.0') None#

Process EVI

Parameters:
  • out_path (Path) – Path to computed indice

  • reprocess (bool, Default to False) – When True, delete existing indice and process new one

  • nodata_clouds (bool, Default to False) – When True, mask indice with cloud mask.

  • quicklook (bool, Default to True) – When True, process indice quicklook

  • baseline (str) – L2A Product baseline. Needed to compute the right indice formula.

class sen2chain.indices.NBR(l2a_product_object, cm_product_object)#

\[Normalized\,Burn\,Ratio = {{NIR-SWIR}\over{NIR+SWIR}}\]

NIR: band 08 SWIR: band 12

process_indice(out_path: PosixPath, reprocess: bool = False, nodata_clouds: bool = False, quicklook: bool = False, baseline: str = '4.0') None#

Process NBR

Parameters:
  • out_path (Path) – Path to computed indice

  • reprocess (bool, Default to False) – When True, delete existing indice and process new one

  • nodata_clouds (bool, Default to False) – When True, mask indice with cloud mask.

  • quicklook (bool, Default to True) – When True, process indice quicklook

  • baseline (str) – L2A Product baseline. Needed to compute the right indice formula.

class sen2chain.indices.NDBI(l2a_product_object, cm_product_object)#

Normalized Difference Built Up Index (NDBI)

\[NDBI = {{SWIR-NIR}\over{SWIR+NIR}}\]

SWIR: band 11 (20m) NIR: band 08 (10m)

process_indice(out_path: PosixPath, reprocess: bool = False, nodata_clouds: bool = False, quicklook: bool = False, baseline: str = '4.0') None#

Process NDBI :param out_path: Path to computed indice :type out_path: Path :param reprocess: When True, delete existing indice and process new one :type reprocess: bool, Default to False :param nodata_clouds: When True, mask indice with cloud mask. :type nodata_clouds: bool, Default to False :param quicklook: When True, process indice quicklook :type quicklook: bool, Default to True :param baseline: L2A Product baseline. Needed to compute the right indice formula. :type baseline: str

class sen2chain.indices.IndicesCollectionMeta#

Adds special methods to IndicesCollection class.

property available_indices: List[str]#

Returns indices classes names.

property list: List[str]#

Returns indices classes names.

get_indice_cls(indice: str) Indice | None#

Returns the indice class.

Parameters:

indice – name of the indice.

class sen2chain.indices.IndicesCollection#

Lists defined indices classes.

Usage:
>>> IndicesCollection.list