Sentinel-2¶
“The Copernicus Sentinel-2 mission comprises a constellation of two polar-orbiting satellites placed in the same sun-synchronous orbit, phased at 180° to each other. It aims at monitoring variability in land surface conditions, and its wide swath width (290 km) and high revisit time (10 days at the equator with one satellite, and 5 days with 2 satellites under cloud-free conditions which results in 2-3 days at mid-latitudes) will support monitoring of Earth’s surface changes. The coverage limits are from between latitudes 56° south and 84° north.” - (European Space Agency)
-
class
rindcalc.
Sentinel
(path)¶ -
__init__
(path)¶ Class to read and write Sentinel-2 data from.
Parameters: path (str) – Path to folder where Sentinel-2 bands are contained. -
path
¶ Dictionary of the path for each Sentinel-2 band.
Type: dict
-
bands
¶ Dictionary of arrays for the bands chosen to load.
Type: dict, array
-
band_options
¶ List of all options for band input names.
Type: list
-
-
load_bands
(which_bands=None)¶ Opens and reads bands into Float 32 arrays. If no list is passed into which bands then all bands are opened and added to the dictionary self.bands.
Parameters: which_bands (list, optional) – A list of band names to open as arrays. e.g. which_bands=[‘band_1’, ‘band_2’, ‘band_3’] Returns: self.bands – Updated self.bands dictionary Return type: dict
-
composite
(which_bands, out_composite)¶ Creates a three band composite out of the specified bands.
Parameters: - which_bands (list) – A list of bands to save as a three band composite. Must be in order of how the bands are to saved within the output TIFF. e.g. which_bands=[‘band_1’, ‘band_2’, ‘band_3’]
- out_composite (str) – The output filename to save the composite,
-
AWEIsh
(out_raster=None)¶ Calculates AWEIsh index
Parameters: out_raster (str, optional) – Output filepath for calculated TIFF. Returns: equation – Output array of the generated index. Return type: array
-
NDVI
(out_raster=None)¶ Calculates NDVI index
Parameters: out_raster (str, optional) – Output filepath for calculated TIFF. Returns: equation – Output array of the generated index. Return type: array
-
SIPI
(out_raster=None)¶ Calculates SIPI index
Parameters: out_raster (str, optional) – Output filepath for calculated TIFF. Returns: equation – Output array of the generated index. Return type: array
-
ARVI
(out_raster=None)¶ Calculates ARVI index
Parameters: out_raster (str, optional) – Output filepath for calculated TIFF. Returns: equation – Output array of the generated index. Return type: array
-
NDI45
(out_raster=None)¶ Calculates NDI45 index
Parameters: out_raster (str, optional) – Output filepath for calculated TIFF. Returns: equation – Output array of the generated index. Return type: array
-
MTCI
(out_raster=None)¶ Calculates MTCI index
Parameters: out_raster (str, optional) – Output filepath for calculated TIFF. Returns: equation – Output array of the generated index. Return type: array
-
MCARI
(out_raster=None)¶ Calculates MCARI index
Parameters: out_raster (str, optional) – Output filepath for calculated TIFF. Returns: equation – Output array of the generated index. Return type: array
-
GNDVI
(out_raster=None)¶ Calculates GNDVI index
Parameters: out_raster (str, optional) – Output filepath for calculated TIFF. Returns: equation – Output array of the generated index. Return type: array
-
PSSR
(out_raster=None)¶ Calculates PSSR index
Parameters: out_raster (str, optional) – Output filepath for calculated TIFF. Returns: equation – Output array of the generated index. Return type: array
-
S2REP
(out_raster=None)¶ Calculates S2REP index
Parameters: out_raster (str, optional) – Output filepath for calculated TIFF. Returns: equation – Output array of the generated index. Return type: array
-
IRECI
(out_raster=None)¶ Calculates IRECI index
Parameters: out_raster (str, optional) – Output filepath for calculated TIFF. Returns: equation – Output array of the generated index. Return type: array
-
SAVI
(soil_moisture=0.5, out_raster=None)¶ Calculates SAVI index
Parameters: - soil_moisture (flt) – Soil moisture value, default = 0.5
- out_raster (str, optional) – Output filepath for calculated TIFF.
Returns: equation – Output array of the generated index.
Return type: array
-