This example was demonstrated in masters level course GIS and Remote Sensing, See references for details. Most of commands are taken from user guide [SpectralPython] whereas theoretical basis are discussed in [MODIS-VI_UserGuide]. This post assumes software is already installed and data is locally available. Invoke ipython --pylab=wx at command prompt.
In [1]: from spectral import *
In [2]: img = open_image('92av3c.lan')
In [3]: blu, red, nir = img[:,:,9], img[:,:,29], img[:,:,43]
In [4]: evi = 2.5 * (nir - red) / (nir + 6 * red - 7.5 * blu + 1)
In [5]: view = imshow(evi)
References: [SpectralPython] [MODIS-VI_UserGuide]
The output image is pasted below.
In [1]: from spectral import *
In [2]: img = open_image('92av3c.lan')
In [3]: blu, red, nir = img[:,:,9], img[:,:,29], img[:,:,43]
In [4]: evi = 2.5 * (nir - red) / (nir + 6 * red - 7.5 * blu + 1)
In [5]: view = imshow(evi)
References: [SpectralPython] [MODIS-VI_UserGuide]
The output image is pasted below.