MODIS

In this example, we demonstrate how to retrieve MODIS satellite data for a specific week in May and process it to generate true-color images. The cloud coverage is limited to 0-20%.

Data Downoad¤

Python
from sipt.retrieval import EOSDIS, copy
import os

collection = 'MODIS/Terra Surface Reflectance Daily L2G Global 1km and 500m SIN Grid V061'
shapefile = './shape.geojson'
start_date = '2024-05-10'
end_date = '2024-05-16'

eosdis = EOSDIS("bearer_token")
eosdis.retrieve("./data", collection, start_date, end_date, shapefile, 4)
copy("./data", "./src", shapefile, ["*_b0[143]*", "*state_1km_1*"], start_date, end_date, num_processes=8)

Pre-Processing¤

Python
from sipt.pipeline import preprocess
from sipt.processing.mask import MaskType

# Bit Flag Description
# cloudy (01) or mixed (10)
preprocess("./src", "./processed", shapefile, "*state_1km_1*", MaskType.BITMASK, 0b11, max_masked_area=20,
            num_processes=8)

Post-Processing¤

Python
from sipt.processing import enhance, combine

combine("./processed", "./final", [1, 4, 3])
enhance("./final", "./final")