get_all_needed_bands#

get_all_needed_bands() dict[source]#

Gather all the needed bands for all index functions

>>> index.get_all_needed_bands()
{
    <function AFRI_1_6 at 0x00000261F6FF36A8>: [<SpectralBandNames.NIR: 'NIR'>, <SpectralBandNames.SWIR_2: 'SWIR_2'>],
    ...
    <function WI at 0x00000261F6FF3620>: [<SpectralBandNames.NIR: 'NIR'>, <SpectralBandNames.SWIR_1: 'SWIR_1'>]
}

>>> # Or written in a more readable fashion:
>>> {idx.__name__: [band.value for band in bands] for idx, bands in index.get_all_needed_bands().items()}
{
    'AFRI_1_6': ['NIR', 'SWIR_2'],
    ...,
    'WI': ['NIR', 'SWIR_1']
}
Returns

Needed bands for all index functions

Return type

dict