Snappy function for radiometric calibration and terrain correction

Hi there,

I’m trying to use SNAP with Python. I tried the snappy examples and everything worked fine. But I would want to perform radiometric calibration (i.e., calculating sigma0) and terrain correction with a Sentinel-1 product. Where can I find the functions for that? I already looked into and found the “Orthorectifier” function, if that’s the right one. But I can’t find anything about “Calibration”.
Is there some kind of user-guide or handbook for using the Python functions? I already found this one:
but that’s not very supportive for further functions.
Maybe someone can help.

Thanks in advance.


1 Like

Hello Caro,

I was in the same situation as you. You can find snappy Operators when you typ “gpt -h” in your command window. To get more informations about possible input parameters you can search for “gpt -h < operators >” (e.g. “gpt -h Calibration”)

I already implemented some of them in a python script (bandMath, kMeans, PCA, Subset, Reprojection,…). If you can use them… :smile:



Hi Andreas,

I would like to calibrate SAR (out of TC operation) by using the python.
I do appreciate if you could advise me how I can reach python or snappy scripts for “Calibration"(from SLC to sigma0) and "filtering”, if possible.

Thanks again

Good morning,

I did not create a script for Calibration or Filtering. But you assume it can create the script easily yourself:

  • Use the GLCM script as basic
  • Replace for example func_code=GLCM with func_code=Calibration (name of the Functions, when you call gpt -h)
  • Use the correct parameters as described in gpt -h Calibration.

I hope this helps. If it does not work, then there are maybe other functions behind it.

You can also call these functions via a command prompt. In this case you need to write the parameters into an XML-File (also described in gpt -h Calibration) and call it. But I did not use this approach until now. So I can not tell you how exactly it works :slight_smile:

1 Like

I have tried Calibration code and it can be opened correctly in terms of sigma0 value.
But the problem is that I can not use it as the input for the Terrain Correction due to the fact that Tie Point Grids (e.g., “Slant range time” and “Incidence Angle”) are missing. Here is the code, does anyone know by any chance what goes wrong with?
Your advice will be a great help.

c:\Program Files\snap\bin\gpt.exe" Calibration -Ssource=‘2014111_HH_SLC\product.xml’ -PsourceBands=‘Intensity_HH’ -t ‘myband1.tiff’ -f ‘GeoTIFF’ -PauxFile=‘Product Auxiliary File’ -PoutputDNBand=‘true’

Hi Caro,

I was wondering if you finally solved your issue ? I also need to do a radiometric calibration, terrain correction and speckle filtering on Radarsat-2 product and I would like to write a snappy script but I can’t find examples of scripts for these processing.



Hi @Jude9Apple

Maybe this notebook helps you with for your snappy script:



1 Like

Hi @Jude9Apple,

yes I was able to solve my problem. I used the gpt via subprocess in Python and it works OK.

1 Like

Hi @Somcar,
Can you send me the complete code u used in snappy by using gpt for radiometric calibration and terrain correction .
Thanks in Advance.