Workflow between SNAP and StaMPS

@falahfakhri reinstalling matlab is quite tedious for me as i require my institute it people to do it again… So i dont think its feasible… kindly suggest me something else

please install gawk , as the command is not found.
run : sudo apt-get install gawk

Later, run mt_prep_snap with the correct parameters, as the way you have used it is not as in the usage.

mt_prep_snap MASTER INSAR_FOLDER amp_thr patch_az patch_rg


as @mdelgado said run

you didn’t type the reference image

mt_prep_snap 20170801

I suggest to run without any parameters at the beginning as a try,

Also I found that I already mentioned to you in this post,



and the folder where data is found (2nd parameter needed from the mandatory list)
mt_prep_snap MASTER INSAR_FOLDER amp_thr patch_az patch_rg

1 Like

Yes, as you mentioned.

1 Like

thank you @falahfakhri and @mdelgado… i did as per your suggestion and now the process is running the terminal… Thank you for your guidance… will let your if things are running in matlab soon…

You are welcome.

Good processing!

1 Like

i am getting such an error in stamps(2,2)

Could anybody tell me what it is and how to solve it?

Well, apparently the system needs too much memory. As you see … there are over 2 million PS candidates and apparently the initialisation of the several variables needs to much memory.

I was wondering if you used the script I have provided to you for the step1, and then, another try is to make many more PATCHes… not only 2x2. But this is related to your AOI. How big is your AOI??? Following StaMPS manual they recommend not to exceed 2 million PS on the candidates, as the processing is less performant. Better to increase the number of PATCHES. Give a try to both thoughts and let us know.

1 Like

okay will try giving more patches

At first i gave the patches to be 5x5 that is i got 25 patches and during the step 2 at patch 4 itself it showed error…
Now, i gave 10x10 that is 100 patches and mt process stopped in step 2 at patch 8…

Kindly guide me with this issue…
@ABraun @thho @mdelgado @falahfakhri

No worries , the solution is here,
Might be it is different error , but

Solution stamps (2,2) step

Before applying the stamps (2,2)

I highly recommend deleting any files have been created out of the four folders already have been created before , resulted from previous applying of stamps (1,1), then reapply stamps(1,1) and continue applying next steps.

Please let me know if it helps,

1 Like

Are you asking me to download the file in the link you provided and replace it?? and then carry out my process??

Okay… if so, where and how should i replace the file?
i found such a file in stamps folder…

Yes, as it is explained in the post,

Navigate to this path,


Remove this file ps_load_initial_gamma.m already exist in within this path stamps_v4.1b/matlab/ folder, somewhere else in your computer and replace it with the one you’ll download from the post.

Let me know if it works.

1 Like

okay done… will try it and let you know…thank you @falahfakhri

Well…this I have said it already to her…
I thought that she did that already but apparently not.
Thanks for remembering her to do that.


i did as you said… But now getting another error here in step 2
@falahfakhri @mdelgado

It’s the same error , if you correctly displaced the previous file by the new one , you downloaded , this error shouldn’t be appear,

i hope i correctly replaced the file as i saw the difference while running the step 1 process…
should i increase the patches?? i gave 10x10…

Delete all your results except of the four folders, Re-run this Script use the same parameters are mentioned, don’t change anything at the moment.

Be sure beforehand to replace the aforementioned file, as it’s explained before, and then restart to run stamps(1,1)------stamps(8,8)

I think something went wrong of last time.