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

Dear all,

thank you for all the solutions posted here. They have helped me to successfully run all steps of the snap2stamps package until now even I am a total newbie to linux and to SAR data. However, I am struggling now with mt_prep_snap and reading the forum I haven’t found anybody experiencing the same problem. I am using S-1 data, 28 scenes in total all from 2018.

The problem is the following: After sourcing StaMPS_CONFGI.bash I run mt_prep_snap in a new empty folder as suggested earlier in the forum. It starts reading the .rslc-files and the results seem ok (no pixels with zero amplitude), see here:

After reading all files is were the error occurs. It seems to be related to teh selpsc_patch:

In the empty folder I created is also creates the following files:

I am using the following software versions:

  • Ubuntu 18.04 LTS
  • python 2.7 environment installed using Anaconda
  • StaMPS 4.1 beta
  • Matlab R2019a update 3

Thank you very much in advance for your help!

Not sure but please try to use the full path pointing to the INSAR folder. I have seen that you use relative path and this could be the cause of your problem

Try and let us know.

Wow, thank you so much! Such a stupid error! I used the full path before when I had also another error and did not try again after I solved it. I imaging this is how it should look like?

1 Like

I believe so. Please check you do not get empty files pscands.ij within the PATCH_XX folders

Hello dears,
I got the PATCH_1 stamps up to PATCH_6, but it turns out that my pscands files are empty in all PATCHs, why is that?

Good question!
It sounds weird to me that your mt_prep_snap step did open the mt_prep_snap file … see line before 100 lines processed. How could it be?

Again… how you run exactly the command?

I have already solved it, it was using mt_prep_gamma, and I think the result is that true (image).

And now I’m on ps_load_initial, what are the steps?


Which was the mean amplitude values for the different images?

I am not sure you really solve it… mt_prep_gamma_snap could be, but not mt_prep_gamma as I remember it…
It could seem that you solve it and then later you start to get errors in StaMPS or at some later step…so please be careful with this.

Then for StaMPS processing, I suggest you to follow StaMPS manual. Here the last manual version:
Then you should learn how to modify parameters in the way you will extract the best from your data.

It is the result of the amplitudes


Well… I see there 2 warnings where SLC had 0 amplitude…
I strongly believe that this is causing all your problems.

Please remove them (and also their respective interferograms) and apply again mt_prep_snap (please be sure in the log there is not any attempt to open mt_prep_snap file … this might cause you issues in the future.


1 Like

Hello friends,
I need your opinions because this error is due to the fact that I am wrong?
to run ps_load_initial_gamma

You should not run it individually…

Hello friends, please opinions,

Thank you

And why does error come up when I plot the unwound phase?

1 Like

how did u solve the “already contains” error?

After debugging the code of that operator I found out that I had two bands in my stack with the same dates of acquisition (by the way, the date in question was the date in the error message!). ,

Hello all,
i completed whole steps of stamps using 16 images, now got csv file. But although i have got a lot of images belongs to various dates, i only see very few. it should have been totally export_res1 to export_res15 but now i have export_res1 to export_res8 in my csv file. This is what kind of csv file i have. @mdelgado @thho

Dear all,
Here is, i explaining my step and attaching log files.
I followed this steps.
I have used python v3 for run py files.

According below comments, pscands.* files size shouldn’t be 0. But my result 0. Anyone take me any suggestion thanks.


coreg_ifg_proc_stdout.log (20.5 KB) export_proc_stdout.log (15.3 KB) ps_parms_initial.log (2.6 KB) split_proc_stdout.log (74.2 KB) STAMPS.log (3.4 KB)


I have had this exact same error when i started processing.
In my case i had accidentally left a ascending file in my descending processing folder.
other options are:
bad ifgs or empty raw images.

You can check this in the LOG of mt_prep_snap.
in the LOG you will see a number for ammount of zero pixels and the mean amplitude.
if the mean amplitude is low or you have to many zero pixels something is wrong.
check and/or delete this ifg from the processing and start again.
This will probably saolve the error (which is related to the ciphers in the array and the matrix dimension).


Yes, i have checked 10 times :smile:
All mean amplitude was 34 or higher.

2nd thing i did was reprocess all my ifgs.
I used Snap2StaMPS so this was not a big issue for me.
That could help, if not i have no clue.