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

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.

Is there some other way for reducing the atmospheric noise except increasing the number of interferograms? I used default parameters of StaMPS during the whole process. Can this bias be reduced by changing any parameter? Or re-running step 6 and 7 multiple times can be done to reduce this bias?

you can integrate external packages such as TRAIN or GACOS which model the atmospheric contribution to remove it, but this is currently not well documented in the StaMPS manual.

Bias of this magnitude cannot be removed by changing some parameters, it’s the phase data which has errors.

1 Like

Hi @ABraun , I want to ask one more thing. I read following in StaMPS Persistent Scatterer Practical by Andy Hooper


When I plotted ps_plot(‘vdrop-do’) I got following results:

All of these deformation maps look similar. Does that mean dropping any interferogram has no effect on deformation velocity? Even if I drop any interferogram atmospheric noise will remain the same? Or I am comprehending it wrong?
Said tutorial is attached
D3B2_Stamps_S1_PS_Exercise_2018.pdf (159.1 KB)

Based on your screenshots above, I would also expect some more differences here. But according to the description dropping any of the interferograms will not have an effect.