Linear to/ from db in python SNAPPY

using tutorial given on website (http://remote-sensing.eu/preprocessing-of-sentinel-1-sar-data-via-snappy-python-module/) I am able to pre-process the sentinel 1 data. Now I want to convert liner to/ from db using SNAPPY and python.
How I will achieve this ??? I have searched internet but found no relevant results.

Kindly help me in this regard.

Hi Harshit,

Have you tried setting the parameter line in the provided link

parameters.put(‘outputImageScaleInDb’, False)

to

parameters.put(‘outputImageScaleInDb’, True)

Ohh… I have not noticed that. Thanks for pointing out.
I will try and update.

Hi,
i had the same problem and found now the solution. It is described in detail at this post:

The solution is not to convert or save in the calibration step. You have to use the raster tool LinearToFromdB:

def convert_dB(source):
print(’\converting to db…’)
parameters = HashMap()
parameters.put(‘sourceBands’, ‘Sigma0_VH,Sigma0_VV’)
output = GPF.createProduct(“LinearToFromdB”, parameters, source)
return output

1 Like