Error in SNAP - StaMPS processing of RS2 data: "Index in position 1 is invalid"

good that you overcame the first error. If you want to compute single steps, you have to write it like this
stamps(1,1)
stamps(2,2)

otherwise, you are re-computing most of the operations from the beginning every time.
The warning message is not critical, you can ignore it.

The error message is strange though, because there are no patches to merge if you compute only one of them. Sometimes the processing environment becomes messy. Before you restart from the mt_prep_snap command, please make sure to delete all files inside the folder where you execute it to have a clean re-run.

I cleaned every thing, only four folder are there. Then re-run the “mt_prep_snap” for 6 pathes, opened Matlab in same directory, I follow the process what u told like “stamps(1,1)” finished then run “stamps(2,2)” got the same error :frowning:

Hi @ABraun, I completed all the steps of stamps like “stamps(1,1)” ,“stamps(2,2)”,“stamps(3,3)”,“stamps(4,4)”,“stamps(5,5)”,“stamps(6,6)”,“stamps(7,7)”,“stamps(8,8)” with single patch.
with 6 Patches, matlab throwing error. So I proceed with 1 patch only.
I removed the extra file from diff0 folder, I think same date file should be there the in diff0 and in rslc.

Please suggest what is the next procedure?

1 Like

Please leave the folders exported from SNAP (diff0, geo, rslc dem) unchanged and select an empty folder where you execute mt_prep_snap. You can try with two patches (command ending with 1 2 )

Hi @ABraun ,
I did with 2 patches. Patch folder file having 0 bytes data.
Got error:
"Index in position 2 exceeds array bounds.

Error in ps_load_initial_gamma (line 108)
rg=rgn+ij(:,3)*rps;

Error in stamps (line 263)
ps_load_initial_gamma;"

Could it be that the data preprocessed in snap2stamps is faulty? Sometimes one of the interferograms was not processed correctly, causing the scripts to raise an error. How many input files are you using and do all interferograms look alright? Please visually check each of them.

Hi @ABraun,
Data preprocessed in snap2stamps was faulty. I thinks there was a faulty data also in my master image.
I processed again from the starting.
This time i did not get a single error and completed all stamps() steps smoothly.
Got all the plots as mentioned in the StaMPS manual.
Thank you very much for guiding me, It is a great experience and learning for me.
Thanks :slight_smile:

1 Like

this is great, good job!

Please let me know the further process after completed stamps process.
How to use stamps-visualisation software?

1 Like

you can either use the StaMPS Vizualizer or export the average velocities as to a GIS compatible ESRI Shapefile

2 Likes

Hello @mdelgado sir I am also getting following error:
stamps(0,2)

STAMPS: ########################################
STAMPS: ####### StaMPS/MTI Version 4.0b6 #######
STAMPS: ####### Beta version, Jun 2018 #######
STAMPS: ########################################

STAMPS: Will process current directory only

PATCH_6: complete up to stage 1
psver currently: 1
psver now set to: 1

STAMPS: ########################################
STAMPS: ################ Step 2 ################
STAMPS: ########################################
STAMPS: Directory is PATCH_6

PS_EST_GAMMA_QUICK: Starting
PS_EST_GAMMA_QUICK: Estimating gamma for candidate pixels
GETPARM: filter_grid_size=10
GETPARM: filter_weighting=‘P-square’
GETPARM: clap_win=32
GETPARM: clap_low_pass_wavelength=800
GETPARM: clap_alpha=1
GETPARM: clap_beta=0.3
GETPARM: max_topo_err=20
GETPARM: lambda=0.0554658
GETPARM: gamma_change_convergence=0.005
GETPARM: gamma_max_iterations=3
GETPARM: small_baseline_flag=‘n’
Found look angle file
PS_EST_GAMMA_QUICK: n_trial_wraps=0.191515
PS_EST_GAMMA_QUICK: Initialising random distribution…
PS_EST_GAMMA_QUICK: 108 PS candidates to process
PS_EST_GAMMA_QUICK: iteration #1
PS_EST_GAMMA_QUICK: Calculating patch phases…
Subscript indices must either be real positive integers or logicals.

Error in clap_filt (line 71)
ph_bit(1:n_win,1:n_win)=ph(i1:i2,j1:j2);

Error in ps_est_gamma_quick (line 225)
ph_filt(:,:,i)=clap_filt(ph_grid(:,:,i),clap_alpha,clap_beta,n_win0.75,n_win0.25,low_pass);

Error in stamps (line 326)
ps_est_gamma_quick(est_gamma_parm);
Although I have used new script you recommended to @ttolhurst and re-ran from step 1. What else could be done to overcome this error?

1 Like

Can above mentioned error be resolved while using multiple patches or there isn’t any solution except using 1 patch? because 1 patch will make processing slow

I’m not sure if it is really a matter of the patch number, but you can try 1 2 or 1 2, for a test to see if it differs.

I am getting these interferograms’ phase images in SNAP. Are these phase images ok to proceed with stamps? I am only using 4 interferograms.

they are technially alright, yes, although you need more images for StaMPS. Can’t say if the phase quality is sufficient for interferometry. I had problems in muddy delta regions as well. The more images you get (at regular intervals) the higher the chances for successful analyses.

1 Like

I have processed IW3 of same images and got following results after stamps complete processing


Are these results alright? what are the attributes of good results of stamps? I mean how can I get to know that my results are alright or have some errors?
and now I want to process IW2 as well and I was getting error in step 2. Now I am trying with 2 patches that might solve the problem.

If displacement maps of all dates look different, there is large contribution of phase noise and atmosphere. It is not uncommon that some interferograms are different from the rest, when there was heavy rainfall, for example. But if the majority does not agree on a certain pattern I wouldn’t trust too much. The average displacement will then be just a mathematical expression of random patterns instead of representing a continuous movement.

If you really want to analyze the time between April 2020 and March 2021, you need at least one image per month.

2 Likes

Thank you so much for this information. It definitely be useful to me

Hi @ABraun I have now used 1 image per month between April 2020 and March 2021 and repeated the whole snap-stamps process and obtained following results:
5.ps_plot_'u-dm'_step6_after7
6.ps_plot_'u-dmo'_step6_after7


7a.ps_plot_'v-do'_radius
7b.ps_plot_'v-do'_ts

2.ps_plot_'u'
3.ps_plot_'u-dm'

Now deformation map look similar except few interferograms. Can you please give some comments on validity of these results? Kindly tell me if still some improvements are required to be done and how ?

I agree this looks quite heavily biased by atmosphere. But good job on getting the results in the first place! If you have the computing capacities, you can try to double the amount of images which also reduces the time between two images to 50%. This could give you higher coherence and more stable results. At the moment, the inteferograms look too different.