custom-scripts
custom-scripts copied to clipboard
ARVI formula says NIR, so shouldn't use B08?
Hi, nice work, just one question, about ARVI:
The present script for ARVI used at
https://github.com/sentinel-hub/custom-scripts/blob/master/sentinel-2/arvi/script.js
states:
let index = (B09 - B04 - y * (B04 - B02)) / (B09 + B04 - y * (B04 - B02));
But, since:
- As said in https://www.indexdatabase.de/db/si-single.php?sensor_id=96&rsindex_id=4 :
General Formula: NIR−RED−y(RED−BLUE) / NIR+RED−y(RED−BLUE) Specific Formula: 9−5−y(5−1) / 9+5−y(5−1)
- true NIR is B08, and true RED is B04 (https://en.wikipedia.org/wiki/Sentinel-2#Instruments);
- it was already changed in the script "5" for "B04" (so it could be expected to change "9" for "B08");
So, isn't a mistake in both the "Specific Formula" and the "arvi/script.js"?
Shouldn't it be used just B08|B04|B02 , like :
let index = (B08 - B04 - y * (B04 - B02)) / (B08 + B04 - y * (B04 - B02));
? Thanks in advance
Seems to be related to #96 - it also mentions ARVI.
Indeed there is a mistake for this index. Before manually changing this one, we would like to check the issue a bit more systematically so we will need a bit more time. Thanks for raising this and for your patience.
This was apparently fixed in #97