//
// The pixelBlocks dictionary does not contain scalars.
inputBlock = pixelBlocks["raster_pixels"] // get the input raster pixel block.
inputBlocks = pixelBlocks["rasters_pixels"] // get the input raster pixel block.
red = np.array(inblock[0], dtype="float") // extractbandids ensures first band is Red.
ir = np.array(inblock[1], dtype="float") // extractbandids ensures second band is Infrared.
After Change
// This method can update pixelBlocks["output_pixels"] and pixelBlocks["output_mask"].
// Note: the pixelBlocks dictionary does not contain any scalars parameters.
if not pixelBlocks.has_key("raster_pixels"):
raise Exception("No input raster was provided.")
inputBlock = pixelBlocks["raster_pixels"] // get pixels of an raster