StaMPS processing error


I am trying to produce the PSI using the S-1 images, using snap2stamps to do the preprocessing. The preprocessing went fine, but when trying to use StaMPS, I encounter the following error:

Array indices must be positive integers or logical values.

Error in ps_est_gamma_quick (line 176)
while Nr(i)==0

Error in stamps (line 327)

When trying to figure out the error, I saw that the error occurs because the array produced by the following code are full of zeros:


Does anyone know why this is happening? Note that I am only using 2 images just to test the procedures and 3 patches produced by the snap2stamps scripts. I already saw a similar solution here, but I do not know how to check if SNAP is exporting NaN values or empty files in the stack.

New StaMPS release (4.1-beta)

are you using the latest version of StaMPS as provided here
and select “snap” as the processor with setparm?


Yes, I am using version 4.1 and if I look at the getparm, ‘snap’ is selected as a preprocessor.


Please try to use more than 2 images. That means that you are doing your trial with 1 single interferogram? or 2? Well… my first suggestion is that you use more images for the trial.

Please let us know


Thanks for the suggestion. When using 4 images (1 master + 3 slaves) and a larger BBOX while running mt_prep_snap, this error did not occur anymore.

However, when running step 5 of StaMPS, I encountered the following error while trying to merge the patches. Does anyone have an idea why?

Merging patches…
GETPARM: merge_resample_size=0
GETPARM: merge_standard_dev=Inf
Processing PATCH_1
Processing PATCH_2
Index exceeds the number of array elements (0).

Error in llh2local (line 42)

Error in ps_merge_patches (line 486)

Error in stamps (line 474)


Did you solve your problem?



Not yet, I am currently blocked on some other project, but I will let you know if it works.