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

Hi @hchong005,

in order to visualize the data in a manner where you can see and click single PS and have the deformation time series plotted, I exported data from matlab with this commands

load parms.mat;
ps_plot('v-dos', -1)
load ps_plot_v-dos.mat
lon2_str = cellstr(num2str(lon2));
lat2_str = cellstr(num2str(lat2));
lonlat2_str = strcat(lon2_str, lat2_str);

lonlat_str = strcat(cellstr(num2str(lonlat(:,1))), cellstr(num2str(lonlat(:,2))));
ind = ismember(lonlat_str, lonlat2_str);

disp = ph_disp(ind);
export_res = [lon2 lat2 disp ts];
metarow = [ref_centre_lonlat NaN transpose(day)-1];
k = 0;
export_res = [export_res(1:k,:); metarow; export_res(k+1:end,:)];
export_res = table(export_res);

The exported .csv was than imported to a R Shiny application I am currently developing, that is what you see on my screenshots. The application allows you to click single dots to look up the ts for the dot and compare up to 5 ts in one graph…the status of this app is somewhat beta and I am changing and adding features all the way, give me a few days and I can share a beta version. To prepare yourself, you need R, Rstudio, and the packages shiny, colorRamps, lubridate and leaflet

some impressions


Hi @FeiLiu,

I changed some parameters mainly in step 6 in stamps and the PS data looks now like that (my “best” result) even that the trend becomes more clear and the selected points look good, in the end, the last point is unwrapped wrong or disturbed.
Until now I do not use any other software to subtract atmosphere, I know about TRAIN but I have not implemented it yet…maybe this would help. As you know I am trying hard on SBAS approach for this case study and hope I get a more satisfying result for the last and most interesting points in the TS plot. I think this could work because in PS the btemp is the largest for the last point, which is clear and a problem of the approach and in SBAS this problem may be solved…so lets see what happens next week :wink:

Hi @hchong005 ,

in this thread you will find the beta version of the application I use to visualize my data

My name is Daniel
So I’ve been working based on workflow described by amazing people such as @katherine , @thho, @FeiLi
And I get this result using ps_plot(‘w’) command

so using 7 SLC data to create 6 interferograms
my question is since I’m very new at this and still struggling and learning on inSAR maybe you can take a look at my result and give some interpretation.
And I have question for @thho in order to export the point to CSV using script in your post How to prepare Sentinel-1 images stack for PSI/SBAS in SNAP
is it run on Matlab command window or write an m file and then run it on matlab?
or is there a default command in StamPS to export PS to CSV?


good to see that the workflow works :slight_smile:
I can not really help you to interpret the images, since I am new to this topic too, I am struggling myself what is deformation, what atmosphere etc. Maybe someone with more knowledge can help you.

Regarding your question, I would suggest to use the lines step by step copy pasting them to the matlab console, because when you do ps_plot(‘v-do’, ‘ts’) you have to do some manual input in defining the plot area and radius. I really recommend to do this just when a reference point is set! Your results will always be heavily affected when relying on the mean of all points of the image…creating and using the csv output should be discussed here I suggest. No there is no default command to export from StaMPS as far as I know, I used a combination of objects created during the StaMPS process and by some ps_plot() commands to build table which can then be exported as csv, it is somehow similar with the google earth kml export which you can use in StaMPS…

hi all
so what is the different between v-ds and v-d because when I plot using ps_plot. I got result as follows:


I’ve read the manual and there’s no description about v-d and v-ds variable

hello guys
i was able to run the psinsar test thx to members from the group and special thx to @thho. but trying to run a new stack i am getting the following error. anyone have any idea why this is coming and how to correct it

Dear FeiLiu, I looked you question about stack averaging but I didn’t found an answer. Do you know why it is necessary put dinsar averaging stack and not dinsar stack?
All the best,

Dear Sir
I am also working on Landslide deformation detection. Wish to do SBAS or PSI analysis. I do not worked with Stamps.
Now SNAP is also being made capable to handle PSI/Stamps.
What would you suggest ?
Will you please help me in Stamps processing?

Hi @virk_rana,

SNAP offers you to perform a preprocessing and export to StaMPS for PSI, SBAS is not possible yet. If you want to join a group of people testing the SBAS workflow with SNAP-StaMPS please have a look here.
I I recommend to read this thread, the papers published by Andy Hooper in which he presents StaMPS and the literature cited in this papers. There are some slides which helped me to become more familiar with the idea, here some more for SBAS. There are other sources that helped me to understand SBAS/PS, this thesis was very helpful for me, but here I will stop recommend literature.
when you feel comfortable with the theory, I suggest following one of the summaries for SNAP-StaMPS workflow given in this Forum, like this one.
The processing in StaMPS somehow depends on your dataset, how many images, how large is your studysite, which topographic and atmospheric conditions, how large is the area where you think a landslide occurs etc. I can not help you answering this questions, it is to specific (for my level of knowledge) and I have to dig deep into each dataset which I process, to set parameters right in StaMPS. But do not feel discouraged, StaMPS is a great tool, you have to invest some time, but you will become more and more familiar with your data and the parameters. So reading some recommended theory and starting preprocessing in SNAP and processing in StaMPS step by step is my advice. Many questions are already answered here or in MAINSAR google group. Gathering the information and hints is another good way of learning the process :slight_smile:
Good luck and I am curious about some of your results!


Hello! I coming back to my quastion. In Some cases (most of all) mix index in Index_NaN is more than lendth of bperp_mat.
For example max index in Index_NaN is 24454944 and length of bperp_mat is 24454943.

Maybe you know the some reason of it and maybe you have some decision?

PS: some addition information. If the pixel size of product is odd - processing works. If it is even - send error in ps_load_initial_gamma in string 191 - index Index NaN is bigger then size of bperp_mat. Or in 205 string - diferent size cann’t concatinate.

Were your results from PS used to monitor minning subsidence on natural surface?@Fikretjfm

Were your results from PS used to monitor minning subsidence on natural surface? @Mehdi

No, my results are related to co-seismic and post-seismic results means after the big earthquake causes big load deformation.

Hi, @thho. Inoted that you have mentioned that Intrieri et al. 2017 used SBAS(SqueeSAR) technology. Actualy, SqueeSAR is one of the PSInSAR. see the picture below:

1 Like

Dear @sentinelgyb, you are right, I messed this up, I think because SqueeSAR as StaMPS with SBAS or PS-SBAS combination does find a higher density of points in the scene. But in fact SqueeSAR is an enhanced PS method, what is marked out as an advantage when it comes to processing, because we do not need many ifgs to unwrap.

However, that is the theory, when it comes to use the approach , even Squeesar uses small baseline subsets, but in an other way as we know it from SBAS…in SBAS we would like to minimize Btemp and Bperp, but when using SqueeSAR you can find that the authors divide the SAR scenes in small baseline sbubsets to minimize Bperp alone.

I changed my post, to make this more clear, thanks for the hint. To better understand what SqueeSAR does, I recommend the paper mentioned in your screen shot doi: 10.1109/TGRS.2011.2124465 Feretti et al. (2011): A new algorithm for processing interferometric data-stacks: SqueeSAR, in the end (section IV) of this paper you can find a example and in table 1 on page 2380 the hint how small baseline subsets are used when SqueeSAR is your choice.

Hi @thho @katherine @ABraun
So in this sample How to prepare Sentinel-1 images stack for PSI/SBAS in SNAP 5
I use 12 Sentinel-1A I got 16000 PS after stamPS process. However recently I used 30 scene for the same area of study. The master selected is chosen by SNAP usin “InSAR Stack Overview”. However when doing stamPS process out of 500.000 (five hundred thousand PS candidate) stamps only chose 4000 PS the rest are weeded out. I use default parameters like my previous test and as @katherine suggested, although in her steps she recommended that if the data/interferogram more than12/13 to split the stack to two or more with same master but when I did this test I use all 30 data in one stack.
What may caused so many possible PS weeded out by StamPS?

Good morning,
I am working on a project about the detenction of the vertical displacement of the surface.
I have done it trought SNAP and SNAPHU but I have obtained not satisfactory results.
Infact I have understood that snaphu starts the unwrupping each time with a different pixel so if I repeat the same steps with the same images I will not obtain the same results and furthermore I have problems with the coordinates of the city that I have used because when I export the last result on google earth the coordinates do not correspond and I don’t know why.
In any case looking for a solution in this forum, I have understood that maybe is better using Stamps with the method of persistent scatterers for my project.
Please tell me if it is right.
But I have not found an user guide or a manual that explain me how install stamps and all the steps that I have to follow in order to obtain my goal.
Can you help me?
Furthermore if you can help me with my problems about snaphu and coordinates I will beI will be grateful.
Best regards.

To be clearer.
I have already found the manual of stamps but I do not understand how to use it together snap in order to have good results of vertical displacement.
Thank you.
Have a nice day


StaMPS may be a better option than snaphu alone, have a look here, to install and use StamPS with SNAP. It may be seams to be complicated, by be patient, as you are working in an urban area, it is likely that you get interesting results! Good Luck!