TopoPhaseRemoval does not apply external DEM - defaults to SRTM 3

I am using snappy to generate S1 interferograms.
I do back-geocoding and then ESD to generate a co-registered pair.
I then chain up the Interferogram > TOPSAR-Deburst>TopoPhaseRemoval modules.
I do NOT remove topohase during the interferogram generation step.
I pass the following external DEM parameters to TopoPhaseRemoval

parameters.put(“demName”, “External DEM”)
parameters.put(“externalDEMFile”, “TDX”)
parameters.put(“externalDEMNoDataValue”, “-32768”))
parameters.put(“externalDEMApplyEGM”, “false”))

The interferogram is then generated but in the processing metadata it reports that “demName” as “SRTM 3sec”.

I did not catch this problem at first and I have generated more than a thousand Interferograms. All of them have been flattened using the SRTM 3sec instead of the external DEM (not even SRTM 1 sec).

Is the “remove topography” during the interferogram generation step preferred over the TopoPhaseRemoval tool?

Can you please look into the apply external DEM with that tool? Particularly with Snappy - I suspect it happens with the GUI and GPT too but have not tested extensively.

This is a pretty bad bug if the user expected to use a high resolution DEM but instead ends up with SRTM 3sec

for what it’s worth I don’t think this happens with GPT with snap 6.0.

I’ve run gpt TopoPhaseRemoval offline where there is no access to SRTM 3 and it runs fine. The metadata report the demName as external DEM

We can delete this post - It seems like I have been making a mistake with my snappy parameter loading.

I essentially started my python script with

HashMap = snappy.jpy.get_type(“java.util.HashMap”)
parameters = HashMap()

And then every function would do:

parameters.clear()
parameters.put(“Arg”, “Val”)

I think I have not been clearing parameters properly all the time or loading parameters for two function without clearing in between resulting in some being remembered in the Hashmap causing strange behavior.

thank you for reporting the solution. Shall I delete the whole topic or should I leave it so others can learn from it? :slight_smile: I leave it up to you.