is_spectral_band

Contents

is_spectral_band#

is_spectral_band(band: str | SpectralBandNames | SarBandNames | CloudsBandNames | DemBandNames | BandNames) bool[source]#

Returns True if is a spectral band (from SpectralBandNames)

Parameters:

band (BandType) – Anything that could be an optical band

Returns:

True if the band asked is an optical band

Return type:

bool

Examples

>>> from eoreader.bands import NDVI, HH, GREEN, SLOPE, CLOUDS
>>>
>>> is_spectral_band(NDVI)
False
>>> is_spectral_band(HH)
False
>>> is_spectral_band(GREEN)
True
>>> is_spectral_band(SLOPE)
False
>>> is_spectral_band(CLOUDS)
False