Workflow between SNAP and StaMPS

If you have the chance to test your data on Linux, it’s worth a try

Hi Francesca!

To work under Windows you should:
1- manually change all the paths in all ( .txt) ( .in) (*.out) generated files of “mt_prep_gamma” from ‘/cygdrive/directory/’ to ‘ directory:’
for example: from ‘/cygdrive/G/’ to ‘ G:’
2- In cygwin: type csh before call Matlab.

For the parameters, they are as @ alvegavaleri mentioned:
mt_prep_gamma [masterdate in format yyyymmdd] [data directory] [amp_threshold] [rg_patches] [az_patches] [az_overlap] [rg_overlap]

For me I used: 0.4 1 1 50 200

Good luck!

1 Like

when running mt_prep_snap I get error “Segmentation fault (core dumped)”…

mt_prep_snap Andy Hooper, August 2017

Amplitude Dispersion Threshold: 0.35
Processing 3 patch(es) in range and 3 in azimuth

opening /mnt/DiscoD/Sentinel1Process/3stampsExport-subset/rslc/20171011.rslc…
Segmentation fault (core dumped)
mt_extract_cands Andy Hooper, Jan 2007

Patch: PATCH_1
selpsc_patch /mnt/DiscoD/Sentinel1Process/3stampsExport-subset/ pscands.1.ij pscands.1.da mean_amp.flt f 1
file name for zero amplitude PS: pscands.1.ij0
dispersion threshold = 0.35
width = 11840
number of amplitude files = 0
Segmentation fault (core dumped)

psclonlat /mnt/DiscoD/Sentinel1Process/3stampsExport-subset/ pscands.1.ij pscands.1.ll
opening pscands.1.ij…
Error opening file pscands.1.ij

pscdem /mnt/DiscoD/Sentinel1Process/3stampsExport-subset/ pscands.1.ij pscands.1.hgt
opening pscands.1.ij…
pscdem: Error opening file pscands.1.ij

pscphase /mnt/DiscoD/Sentinel1Process/3stampsExport-subset/ pscands.1.ij
opening pscands.1.ij…
Error opening file pscands.1.ij

according to the manual, reasonable values for the amplitude dispersion are between 0.4 and 0.42. I don’t know if this is the cause for your error and you probably know what you are doing there.


Values of amplitude threshold mentioned by @ABraun are ok, but you can use a lower threshold when the time series is shorter in time.

The segmentation fault message could be due to many things, but here two of them that come to my mind:

  1. anything went wrong while running the make command at the moment of installing StaMPS on your system
  2. you had not enough RAM on your system (less probable)

I hope this helps

Hi @ABraun and @mdelgado, thank you…
I was able to solve the problem by reinstalling OS, going from opensuse Tumbleweed to Leap 15, and now I do not have core dumped in mt_prep_snap … just reinstalling StaMPS did not work.
I have another problem, SNAP download the srtm file “” … but the page is not found …

is manually downloading an option? You can place the file in the directory under auxdata\dems\

Regarding the DEM download, in fact this is a page not found so it should be any developer taking the action to fix it.
Can any of you (@marpet or @lveci) please solve this? Maybe getting a local repository instead of third party’s dependencies??

Regarding the StaMPS installation… it is weird that did not work. Can you share with us how did happen? You only need to compile the src folder with make and later make install and add the paths to your environment.


It seems that the service was revised and the URL changed.
For example this one works:
Regarding the tile, I think it is a water tile and therefore not present.
As referenz have a look here:

I’ve marked the 23_7 tile with a red dot.

I think the solution would be to update the URLs in the DEM Downloader and to consider that tiles might not be present because they contain only water. What do you think @lveci?

Regarding hosting the data, I don’t think this should be the duty of SNAP. We need to rely on external services and can’t host everything on our own. Otherwise we would end up being another DIAS. :slight_smile:

As a temporary workaround, it might work if you change the URL in the file. It is located in the etc folder of the SNAP installation directory.
DEM.srtm3GeoTiffDEM_HTTP =
DEM.srtm3GeoTiffDEM_HTTP =

But still the problem persists that the tile srtm_23_7 does not exist.


hi @ABraun @mdelgado @marpet
ok… i can use a external dem in coregistration and interferogram process, but i can’t use it in StaMPSexport (SNAP), i don’t have the option …

i change the file to: “DEM.srtm3GeoTiffDEM_HTTP =” … but SNAP is trying to download the wrong page too.

INFO: org.esa.snap.core.dataop.dem.ElevationFile: http retrieving

INFO: org.esa.snap.core.dataop.dem.ElevationFile: http retrieving
WARNING: org.esa.snap.core.dataop.dem.ElevationFile: http error: on

thanks !!

1 Like

So this means that both URLs are used. The old one and the new one you have specified.
Actualy either only the newly specified one should be used.
But in the end it worked for you? I don’t get it from your post.

no…it does’t work … because snap is trying to download the old site too … i erased and replaced the old line, maybe i need to change other file too…

Ah okay.
Maybe @lveci can help futher?

I don’t get it. The StaMPS export itself doesn’t download any SRTM data. Do you mean the topographic phase removal?

… yes, this is weird, because if I run it from a console with GPT, the xml graph asks for SRTM; however, if I run it from SNAP, the same graph works correctly … i don’t now !!!

1 Like

Dear Sir,
I am new to StaMPS software. i kindly request you to please assist me in installing the software.

  1. I have Installed Cygwin compiler in windows.

it would be very helpful if you could assist me in installing.

Thankyou in advance,
best regards

Dear Helper,
I am duoc nguyen, I have some problems when run step 2 (stamps) in matlab like figure.
Can you help me reslove and explain this problem.
Thank you so much.

coh-iw3-vv elevation .

**After i execute the interferogram formation.**I got an unexpected result.The first picture is the cohenrence,and the second is the elevation.was I wrong.If that,please point that where was wrong.I got no idea. need help.thanks before.

low coherence leads to bad interferograms. I don’t think you did anything wrong but in regions with high vegetation cover, InSAR is hardly possible.