For IW product both VV and VH Band are terrain correction

I want to do terrain correction for both band , but the result : dimap - .data - IMG file were written about 32 M,beside , during the python run, the time of IMG that be modified is keeping change…
filename = “/home/snapws/s1_p/S1_data/S1A_IW_GRDH_1SDV_20160611T222046_20160611T222112_011669_011DDC_7FB0.zip”
sentinel_1 = ProductIO.readProduct(filename)
polarization = “VH,VV”

def do_calibration(source, polarization):
parameters = HashMap()
parameters.put(‘sourceBands’, ‘Intensity_VH,Intensity_VV,’)
parameters.put(‘selectedPolarisations’, polarization)
target_0 = GPF.createProduct(“Calibration”, parameters, source)

    return target_0

def do_speckle_filtering(source):
parameters = HashMap()
parameters.put(‘sourceBandNames’, “Sigma0_VH,Sigma0_VV”)

    parameters.put('filter', 'Refined Lee')
    parameters.put('outputImageInComplex', True)

    output = GPF.createProduct('Speckle-Filter', parameters, source)


     return output

def do_terrain_correction(source, crs):
parameters = HashMap()
parameters.put(‘demName’, ‘ASTER 1Sec GDEM’)
parameters.put(‘imgResamplingMethod’, ‘BILINEAR_INTERPOLATION’)
parameters.put(‘incidenceAngleForSigma0’, ‘Use incidence angle from Ellipsoid’)
parameters.put(‘mapProjection’, crs)
parameters.put(‘pixelSpacingInMeter’, 150.0)
output = GPF.createProduct(‘Terrain-Correction’, parameters, source)

    return output

calibrated = do_calibration(sentinel_1, polarization)
filtered = do_speckle_filtering(calibrated)
tercorrected = do_terrain_correction(filtered, srs.ExportToWkt())
ProductIO.writeProduct(tercorrected,opath+tercorrected.getName()+‘final.dim’, ‘BEAM-DIMAP’)
sentinel_1.dispose()
sentinel_1.closeIO()
loopendtime=str(datetime.datetime.now())

I can not make the backspace well ,the code style is ok, If I have miss some parameters? Thanks!

What is not working? Are you not satisfied with the result?

thank s。 the final image is smaller at scale and been rotated with about 90 degree. it does not work well

The reason because it is rotated might be the srs (crs) you use. Which one is it?
The small scale results from the parameter ‘pixelSpacingInMeter’ you’ve set to 150 meter. You can set it to 30. Then you get results with a higher resolution.

yeah,I have finish it !
I wonder : what is difference result between sigma beta gamma bands when I do_calibration.
I have taken a look at the api. For snap desktop, If i have select the VH &VV bands, the result is gamma0VH.gamma0VV; Only when I select on band,the result is sigma0 band.
For my python code part, it is sigma0VH sigma0VV。
Can you give me a link on the model descipteion or guide?
Thanks!