Hello,

I am trying to apply the PSI method to a test set of RS2 data using SNAP and StaMPS. I have been able to follow all of the steps that are outlined elsewhere in the forum (generating and SLC and interferogram stacks, StaMPS export, running mt_prep_snap) up until running the matlab script stamps.m. It is failing in step 2 in the ‘Calculating patch phases…’ step. The error is:

"

Index in position 1 is invalid. Array indices must be positive integers or logical values.

Error in ps_est_gamma_quick (line 236)

ph_grid(grid_ij(i,1),grid_ij(i,2),:)=ph_grid(grid_ij(i,1),grid_ij(i,2),:)+shiftdim(ph_weight(i,:),-1);

Error in stamps (line 326)

ps_est_gamma_quick(est_gamma_parm);

"

I have looked into the matlab code itself and it looks like the problem is the existence of NaNs in the array grid_ij() in ps_est_gamma_quick.m. I was wondering if anyone has a suggestion as to what the cause of this might be? I have included screen shots of the stacks I am using, in case this is helpful.

Many thanks in advance,

Best,

Thomas