|
1 |
| -// Modified Simple Ratio 670,800 |
2 |
| -// URL http://www.indexdatabase.de/db/si-single.php?rsindex_id=110=&sensor_id=96 |
| 1 | +// |
| 2 | +// Modified Simple Ratio 670,800 (abbrv. MSR670) |
| 3 | +// |
| 4 | +// General formula: (800nm/670nm-1)/sqrt(800nm/670nm+1) |
| 5 | +// |
| 6 | +// URL https://www.indexdatabase.de/db/si-single.php?sensor_id=96&rsindex_id=110 |
| 7 | +// |
3 | 8 |
|
4 |
| -let index = ((B08)/(B04)-1)/(Math.sqrt((B08)/(B04)+1)); |
5 |
| -let min = -0.917; |
6 |
| -let max = 3.792; |
| 9 | +let index = (B08 / B04 - 1.0) / Math.sqrt(B08 / B04 + 1.0); |
| 10 | +let min = -0.915; |
| 11 | +let max = 3.78; |
7 | 12 | let zero = 0.0;
|
8 | 13 |
|
9 | 14 | // colorBlend will return a color when the index is between min and max and white when it is less than min.
|
10 | 15 | // To see black when it is more than max, uncomment the last line of colorBlend.
|
11 | 16 | // The min/max values were computed automatically and may be poorly specified, feel free to change them to tweak the displayed range.
|
12 | 17 | // This index crosses zero, so a diverging color map is used. To tweak the value of the break in the color map, change the variable 'zero'.
|
13 | 18 |
|
14 |
| -var underflow_color = [1, 1, 1]; |
15 |
| -var low_color = [208/255, 88/255, 126/255]; |
16 |
| -var high_color = [241/255, 234/255, 200/255]; |
17 |
| -var zero_color = [0, 147/255, 146/255]; |
18 |
| -var overflow_color = [0, 0, 0]; |
| 19 | +let underflow_color = [1, 1, 1]; |
| 20 | +let low_color = [208/255, 88/255, 126/255]; |
| 21 | +let high_color = [241/255, 234/255, 200/255]; |
| 22 | +let zero_color = [0, 147/255, 146/255]; |
| 23 | +let overflow_color = [0, 0, 0]; |
19 | 24 |
|
20 | 25 | return colorBlend(index, [min, min, zero, max],
|
21 | 26 | [
|
|
0 commit comments