I'm trying to calculate WDVI index but for some reason the computation failes and I don't find my mistake. The function works but all the pixels are 0.
var addWDVI = function(image) {
var red=image.select('B4');
var RedEdge=image.select('B8A');
var WDVI = RedEdge.subtract(red.multiply(RedEdge.divide(red)))
.rename('WDVI')
.copyProperties(image,['system:time_start']);
return image.addBands(WDVI);
};
This is the link to my code- https://code.earthengine.google.com/43e76e0665ceb3dc20dcbc8a8cae5e25
My end goal- to add this index to my code