Error in StaMPS PS weeding (Step 4)

If someone could help me it would be most appreciated. I am trying to process PS using 4 patches and I can’t get past step 4. It gives me the following error:

STAMPS: ########################################
STAMPS: ################ Step 4 ################
STAMPS: ########################################
STAMPS: Directory is PATCH_1

PS_WEED: Starting
PS_WEED: Weeding selected pixels…
GETPARM: weed_time_win=730
GETPARM: weed_standard_dev=1
GETPARM: weed_max_noise=Inf
GETPARM: weed_zero_elevation=‘n’
GETPARM: weed_neighbours=‘n’
GETPARM: small_baseline_flag=‘n’
PS_WEED: 302116 low D_A PS, 0 high D_A PS
PS_WEED: 44 PS with duplicate lon/lat dropped

PS_WEED: Estimating noise for all arcs…
Index exceeds the number of array elements (26).

Error in ps_weed (line 358)
time_diff=(day(ifg_index(i1))-day(ifg_index))’;

Error in stamps (line 387)
ps_weed;

The strange thing is that I set small_baseline_flag=‘n’, but ps_weed.m runs the command small_baseline_flag=‘y’

maybe you have to start from step 1 again after changing the flag to ‘n’?

Thank you for your reply. I set and checked the parameter before the first step, it is indeed “n”. Therefore, I don’t know what caused this error.

I used 26 images for PS. This is the parameter called when the error occurs. Maybe this is the problem, but I have no idea.1234

I agree, 26 images should lead to 25 inteferograms…
which script (mt_prep_) was used to prepare the files?

mt_prep_gamma

because you prepared the data with gamma?

Otherwise you should use mt_prep_snap, as provided since v 4.1b https://github.com/dbekaert/StaMPS

Thank you for giving me ideas, I found that my preparation file included an extra interferogram. Now I have resolved this error.