Hello all,
I am interested in retrieving the ratio VH/VV from Sentinel1 in decibels using FIS. I have tried different ways to get these values but I didn´t succeed.
In the first place, I tried to get them straightaway using this code return[10*Math.log(VH/VV)]; but I got a bunch of NA values.
Later on, I tried to make it in two steps. First, I get the linear ratio using return [(VH/VV)]; and then I apply locally the conversion formula 𝜎0(𝑑𝐵)=10∗𝑙𝑜𝑔10𝜎0. However the values I get doesn´t make sense.
Please, can anybody help me with this?
Cheers.
Note: I am using IW acquisition mode and DV polarization.
What happens in this case is that within the chosen polygon some VV values on some dates go to (exactly) 0. I figured this out by setting the configuration to
return [Math.log(VH/VV),VH,VV];
After running Statistical API, I noticed (looking at C1 and C2 components of the response) that some polygons have min value 0.
Log(0) is undefined, which then corrupts further processing of statistics.
The following Custom script works around this issue:
var vh_var = VH;
var vv_var = VV;
if (vh_var==0) vh_var=0.00000001;
if (vv_var==0) vv_var=0.00000001;
return [Math.log(vh_var/vv_var),VH,VV];
I configured S1-PRUEBA-DEBUG layer within your instance: https://services.sentinel-hub.com/ogc/fis/<INSTANCE_ID>?LAYER=S1-PRUEBA-DEBUG&CRS=EPSG:4326&TIME=2017-07-01/2017-09-30&GEOMETRY=POLYGON((42.2761737982654±4.5769184322739,42.2776725087976±4.57599800560981,42.277313584786±4.57628383690692,42.2761737982654±4.5769184322739))&RESOLUTION=10m
Note: there is no point in using RESOLUTION=10m as S1 has natural resolution of 20m.
Actually, if you change the resolution to 20m, the original query will work as well, which means that 0 values probably come from interpolation. https://services.sentinel-hub.com/ogc/fis/<INSTANCE_ID>?LAYER=S1-PRUEBA&CRS=EPSG:4326&TIME=2017-07-01/2017-09-30&GEOMETRY=POLYGON((42.2761737982654±4.5769184322739,42.2776725087976±4.57599800560981,42.277313584786±4.57628383690692,42.2761737982654±4.5769184322739))&RESOLUTION=20m