How to prepare Sentinel-1 images stack for PSI/SBAS in SNAP 5


@FeiLiu I run the process in windows under Cygwin and it works correctly, try using csh shell instead of bash (I couldn’t use it under bash but no problems with csh). The only problem that appears is that mt_prep writes some files with the required paths to import data on matlab and due to the way Cygwin works the paths didn’t match with the ones on windows. However, the solution is as simple as modify this files (I added some extra lines to mt_prep to do it automatically when the process is finished, I can upload it if someone wants it).

@bayzidul from my relativlely short experience using SNAP, Tops Split step is necessary because SNAP can only corregister images in the same subswath (if you want to make an interferogram using the whole IW swath width you need to corregister the three subswaths separately and use tops merge operator afterwards). Deburst is also necessary to merge the different burts, otherwise your images will have a nice black fringes a part from the duplicated pixels that will appear on the overlapping part of each burst.

For lat and lon files simply rename rslc files as FeiLiu indicated and it is necessary to do it even if you applied TC. Finally, you are right about Stamps export and corregistered stacks of at least 4 interferograms are required. However, ifgs have to be created individually because topo removal operator doesn’t work properly with stacks (see annamaria post where she explains it) and create a stack of ifgs before exporting to snap.

Personally, I’ve followed the workflow indicated by katherine at the begining but using the approach that annamaria explained to create ifgs and the modified scripts that FeiLiu uploaded. Doing so I achieved quite good results.


Dear Bayzidul,

Thank you so much for your response, I’ll come back to you soon. And thanks to @FeiLiu he answered most of your comments.


Dear FeiLiu,

Thank you so much for your response and I’m waiting your comments to the second part, and responding to your questions,

I installed StaMPS under Cygwin properly, but I didn’t run it yet.

Please take a look at this work in the following link,


Dear All,

This is the editted version By me @falahfakhri of PSI USING StaMPS, according to the questions of @bayzidul and answers of @FeiLiu

Would you please to find it as attachment file, waiting the collaboration of you all.

PSI USING StaMPS_V_3.docx (185.9 KB)


Dear Bayzidul,

Here comes answers to your comments,

-Satellite orbital path must be the same for both satellites (Yes in most cases)
-Orbit direction must be the same (both ascending or descending orbits) (Yes)

  • No, you can’t generate an interferogram between ascending and descending acquisitions. (It is inapplicable)

In the StaMPS export add Debrusted stack first then Debrusted Interferogram (According to SNAP V.5 it is not possible to implement topo pahse removal before DEBURST)


Dear @alvegavaleri

Thank you so very much. Did you also ran the script from the data directory (where you have exported all StaMPS files).

cd //full_path_to_data
mt_prep_gamma_snap(changed) 20150728 /full_path_to_data/ 0.4 2 2 50 200



Thank you @falahfakhri


Yes I run mt_prep_gamma_snap from the same directory where I have the data exported by SNAP.


Dear colleagues,

Here comes a new editted version of implementing PSI using SNAP and StaMPS, according to @gabrielaquintana77 questions and notes.

PSI USING StaMPS_V_4.docx (186.3 KB)


Have a nice day, everyone.
I reached the step StaMPS.
Further I can not understand how move. Received in SNAP folders (/ diff0, / geo, / dem, / rslc). They must be placed in the catalog StaMPS or not.
Where to run the mt_prep_gam file and how to connect the matlab?
Excuse for troubling. Give please advice.


Please, I’d like to draw your attention to the previous post


Not running “make install” in the directory StaMPS.
error - “make: *** do Not set goals and not found make-file. Stop.”


Hello @Alex_P
You have to run make && make install from the src folder. Which platform are you using ? Can you show us a screenshot of the Terminal, maybe then i could help you a little bit more.



Thank you. Bayzidul
Win10. Cygwin64 Terminal. Make install from src
does not exist directory / bin


Hi @AranLarra. I read your message just now.

However, for both ERS and ENVISAT cases, I obtain PS’s in vegetated or forest áreas…
What may be the cause of this error???

I don’t know if you find the reason of your problem. Watching your maps, it seems that you are using two different subset. So, have you check the lat and lon bands are correct? Also, have you check that all your images are visible before StaMPS export?
If all is ok, the problem is in StaMPS elaboration. How many pixel are selected during step2 and step3?


Hi @Alex_P

The installation confirmation in Cygwin is also same fo rme…

In LINUX i also have the same confirmation BUT here it shows the bin directory and had also ran StaMPS from matlab and it worked…

In this regards someone else could help us by posting the screenshot of their installation confirmation.
@annamaria @AranLarra @FeiLiu @falahfakhri @cfatras


I also tried cygwin on Windows an thought I got it compiled but as soon as it comes up to Matlab, syntax issues and other dependencies forced me to quit this. I think the only reliable way is to have a Linux PC somewhere.


Anyone can help me about how to get .lat and .lon files. I masked the master file and export pixels but the .txt file is almost 6GB. .lat and .long files contain just coordinates or Pixel-X Pixel-Y Coordinates? Could you share one of you inside the .lat and .lon files?


you don’t export the pixe values as text, save them in ENVI format instead. See here (4th post):


Thanks @ABraun. I got it and obtained .lat and .lon files easy way. But I have some error still. I am using cygwin64 and tried both mt_prep_gamma and mt_prep_gamma_snap version but I got same errors. PATCH files are created but progressing didnt started. It says mt_extract_cands: Command not found but it is in the bin files. What should I do?