Calculating band information using snappy

Hi! I am new to snappy. Basically, I want to use snappy for SAR Calibration for Sentinel-1. For that, I need to perform some basic operations on the data set using snappy.
I need to create a subset, given the coordinates and the size of the subset, and calculate the mean intensity of all pixels of a particular band. (Same as using the “Statistics” function in the “Analysis” option in SNAP) . I need to do calculations based on the mean intensity.

Also, if possible can someone provide me with the snippet of code that calculates the mean?

You can use GPF to do the operations. Actually you don’t even need to us python. You can define your processing graph in the GUI and let it run from the command line.

For Python examples I would suggest to search for ‘GPF.createProduct’. This will show you several examples how snappy and GPF can be used from Python.

why do you want to do that in python? Anyway you can find a small set of python examples in the external resources of this STEP website. And soon more tutorials about snappy will be added.