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

Hey everyone thanks to all the help and resources here I’ve been able to successfully run the SNAP>StaMPS workflow for PS using a 9 Sentinel-1 1 images. : ) Thanks to all especially @katherine, @ABraun, @thho.

Now, however, I was wondering about generating a larger stack for export using a greater number of interferometric pairs generated from a combination of a small number of images. Such that say starting with just 9 images one could create about 38 ifg pairs (ie those pairs with Bperps < 150m) which would then used to create a larger Stack in SNAP for PS export and use with StaMPS?

I’ve seen this process mentioned in several papers in relation to PS, not SBAS as I would have expected, but haven’t read or figured out how it might be done with SNAP. Any thoughts, leads or ideas would be appreciated. Due to seasonality and $$$ limitations I will ultimately be applying the techniques learned to small number TerraSAR X images for ground subsidence research.



i ran successfully the snap + stamps workflow on Sentinel-1 IW ascending stack (2 year, 25 images, ca. 800 km2). Unfortunately something turned bad, because if i’m export the result with ps_gescatter, or the ps_output command, the PS points are not in the geocoded location. The study area is in the middle of Europe, but i got coordinates around [0,0].
About my workflow:

  • SNAP 6.0, and STAMPS (Linux), following the recommendations by the STEP forum users (and thho html extract)
  • I “checked” the “Output Orthorectified Lat/Lon” on Interferogram formation (actually, i use graphs, where the outputLatLon parameter is true).
  • I got the orthorectifiedLat and orthorectifiedLon bands, and the pixel values are ok after the interferogram formation. Everything looks great.
  • At the stamps export library, what i get when i run the Stamps Export from SNAP, in the *.diff.par files, the center_latitude and center_longitude values are ok.
  • In STAMPS, i followed the official user manual.

The informations, what i got:

After all, i have no idea what is wrong, so any suggestion will be appreciated :slightly_smiling_face:
Many thanks,

are the coordinates alright in Matlab when you use ps_plot?

Hi guys !

Thank you so much for the topic, it helped me a lot !
I used Snap v6.0.4 and I succeeded to process my Sentinel-1 data using the processing chain presented by bayzidul and others for PSI (without the ESD step).
I have pictures between October 2014 and December 2017 for a total of 130 scenes with both S1-A and S1-B.
The selection of persistent scatterers is quiet good, I have pixels only over man-made infrastructures and point locations are pretty similar to what I got with ERS and ENVISAT results.

However, at the end, my time series is highly dispersed with more than 1 cm of difference between two consecutive dates while the real displacement is less than that.

Does someone face the same problem than me or know what could be the problem?

Kind regards,
Guillaume Modeste

if this only affects one image pair it is likely that atmospheric disturbance is playing a role. Did you try to remove some of this noise by changing the weed_alpha and weed_standard_deviation flags for a higher number of points are dropped?

Hi, actually i run matlab with -nodesktop -nosplash -nojvm, so I have not any UI, only terminal. How can i export to file the ps plot? Sorry, i am a matlab beginner :slight_smile:

Thank you for the quick answer.

My area of study is small, less than 50 km per 50m, and the topography is flat, so I don’t think that the atmospheric disturbance is so important.
The dispersion is more important over the only S1-A period and get smoother when S1-B arrives, but still leeds to a hardly linear curve …

I am going to try with the weed_standard_deviation parameter but I don’t know nor see the weed_alpha parameters on StaMPS …

if you have the chance to use the GUI I would recommend it because it helps you keeping track of some of the steps.
Have a look at chapter 9 for the different plotting options:
I am not sure if plotting can be also called from outside the GUI, I have never tried. But could be possible :slight_smile:

you can check any parameter’s value with getparm and change it with setparm (chapter 6)

About how to change the weeding thresholds: (chapter 4)

Oh, that’s weed_time_win in the codes now.
Thanks for the tips, I try that and I let you know if any improvement.


now i have GUI (a whole new world :smile:), and tried to plot some coordinates from the ps2.mat->lonlat file:
I have 259101 PS points, the values in the first column are 0 to 2,13(lon), and 0 to 0,068 in the second column (lat). The lower left corner is the “origo” [0,0]. Here is a screenshot:

What should I check now?
Thank you for your answers :slight_smile:

If you proceeded to at least step 6, you can just plot the whole map with

Ok, that is what i got:

as you described, the lat/lon information wasn’t transferred correctly.
I hoped this was not the case for the GUI part.

I have no idea at which step the geocoding went lost, to be honest. If you exported lat/lon bands with at the interferogram step and the StaMPS export didn’t give any warning it should be alright.

Some thoughts:

  • Have you set the processor to ‘gamma’ before starting the matlab processing?
    You can check with getparm, sometimes it is still ‘doris’. I don’t know if this caused the error but it could be worth a try.
  • Have you replaced the matlab script and the shell script provided by catherine here: Workflow between SNAP and StaMPS
    Make sure you have a copy of the old ones and then rename them accordingly so they are addressed under the original name.

Thank you for your help, ABraun.

I had set the insar_processor to ‘gamma’ (checked it), and i replaced the matlab and shell scripts to the new one (checked it). I had to be edit the ps_load_initial_gamma file at line 180 and 183, i added the ‘-v7.3’ parameter, because of a well known file save issue.

The Stamps export didn’t drop any error or warning, and i got all off the data and dir that was described before in this topic (dem, diff, geo, rslc). I’m just copied to a new dir, which is the input of the mt_prep_gamma. The structure of the input dir:

  • dem: contains 2 files (rslc and par), from one of the stamps output dir (chosed randomly, becauseall of the same)
  • diff0: contains 24 base, 24 diff and 24 par files (i had 24 stacks).
  • geo: contains 6 files,, 20160519.lon,, 20160519.lon.par, elevation_dem.rdc, elevation_dem.rdc.par (20160519 is the master date).
  • rslc: contains 25 rslc and 25 par files (i had 25 images).

Maybe something went wrong, when i copied the Stamps outputs (geo directory)?
I ran the whole STAMPS process under terminal, without GUI, so i didn’t checked the results after the steps. Next time i will run from mt_prep_gamma to stamps(8,8), step by step, and i will check the outputs in matlab.
(if there is a better topic for my problem, please let me know :slight_smile: )


Seems you have done nothing wrong - good luck! :slight_smile:

You should had checked the log information coming out from the mt_prep_gamma command.

What you show there is seems that the lat/lon were not considered… even if then inside MATLAB you got some coordinates. Stilll which are those values 1.0 and 0.00 ??? Are those coordinates matching with your AOI?

Just wondering…

For what you said I am not sure the mt_prep_gamma got the right values for those coordinates.

Btw, had you used the mt_prep_gamma after modifying the gamma format to read? Please use the mt_prep_snap which is provided with the latest stamps version available on github.

Let us know.
Good luck!

the image is broken.

Hi guys !

I have retreated my data by playing with weeding parameters and dropping noisy interferograms.
But I still face the same problem with an important dispersion in my time series.

May this problem come from SNAP processing?

did you maybe multi-look your data?

If you want to go sure everything is fine, I can recommend the scripts provided by @mdelgado here: Snap2stamps package: a free tool to automate the SNAP-StaMPS Workflow

You simply place all slave zip files into a slave folder, create a master folder where you apply orbit files and TOPS Split and then the scripts do the rest for you including the export. I was able to get nice results with it.