 Sentinel -1 infinity value pixels

Hello,

Many times I encounter an issue with the sentinel-1 images, when I get infInity value pixels. I have tried in the past to avoid it by adding 0.00001 to the vh bands, however it is not real solution.
I wonder what is the cause of these values in sentinel-1 and if there is any efficient way to deal with this issue.
It may be that I do something wrong with the pre-processing of the image because I wrote it long time ago before the lee filter was added.

This is the evalscript I use

//VERSION=3

function setup() {
return {
input: ["VV", "VH"],
output: {bands: 2, sampleType: "FLOAT32"}
}
}

function evaluatePixel(sample) {
const vv = 10 * Math.log(sample.VV) / Math.LN10;
const vh = 10 * Math.log(sample.VH + 0.00001) / Math.LN10;
return [vv, vh];
}

Best

Reut

Hi Reut,

In your Evalscript, you are converting the linear backscatter intensity to decibels. To do so, you use the formula:

VHdB = 10 * log(VH)

If the backscatter intensity of a pixel is equal to 0, you will get infinity in dB, because:

" log 0 is undefined . It’s not a real number, because you can never get zero by raising anything to the power of anything else. You can never reach zero, you can only approach it using an infinitely large and negative power." [Source: University of Minnesota].

If we look at an image and highlight the pixels where the intensity is zero, we see that there can be quite a lot over water or desert areas (example).

PS: our Evalscripts now support an easier method to convert to decibels: instead of having to do

let vv = 10 * Math.log(sample.VV) / Math.LN10;

you can do

let vv = 10 * Math.log10(sample.VV);

2 Likes