Subtract Topographic Phase using snappy

I’m currently trying to calculate an interferogram using snappy.

parCoh = HashMap()
parCoh.put('subtractTopographicPhase', True)
parCoh.put('demName', 'Copernicus 30m Global DEM')
coh = GPF.createProduct('Interferogram', parCoh, tss)

The code runs with no errors but the topographic phase subtraction does not seem to be working. I suspect the parameters are not correcly defined and i’ve tried many variations.

Left: python image, Right: manual snap image

I’m posting here after not finding answers online.
Does anyone know how to solve this problem?

Thanks in advance

snap version 8.0.9
python 3.6

Looks like the coherence estimator window size is different, at least.


In both cases, I didn’t change anything related to the window size.
However, on the left side image I used a Terrain Correction with a “Pixel Spacing” of 20 m, while on the right side image I used “Pixel Spacing” of 13.89 m (default value).

I had a similar issue and fixed it by setting the ‘coherence range window size’ and ‘coherence azimuth window size’ parameters when generating the interferogram. This produced a coherence image that matched the resolution when I did the processing using the SNAP gui.

The code I used for these parameters:

    params = HashMap()
    params.put('cohWinAz', 3)
    params.put('cohWinRg', 10)
1 Like