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

Dear Sarto28,
I would like to show me how did you solve the problem of errors in step 5 of stamps, I got also the same errors and I don’t know how to solve it.
STAMPS: ########################################
STAMPS: ################ Step 5 ################
STAMPS: ########################################
STAMPS: Directory is PATCH_6

PS_CORRECT_PHASE: Starting
Correcting phase for look angle error…
GETPARM: small_baseline_flag=‘n’
PS_CORRECT_PHASE: Finished
Error using movefile
Text file busy

Error in stamps (line 462)
movefile(‘patch.list’,‘patch.list_old’);

Hi Naima,
I solved the problem in this way: “change movefile with copyfile in stamps.mat (around line 462)”
To keep in mind: I used only one patch in mt_prep_snap

Cheers,
Sarto28

2 Likes

Hi Sarto28,
thank you for answer I will try what you did. for me i used 6 patches. i let you know.
merry Christmas

hi, dear thho. what is the reason for this error in the first step of stamps?image

I got the same error in stamps(2,2) processing.
Please let me know how you solved this.

Thanks

actually, replacing the script as described here should address the “array indices must be positive…” error: New StaMPS release (4.1-beta)

Yes, I replaced the mentioned script, same error is occurring.
I am not getting this, where i have to address the “array indices must be positive…”

sorry, I just referred to the error message which was solved by replacing the script in other reported cases.
grafik

I updated “ps_load_initial_gamma.m”,and replaced, make a backup also.
getting same error.
I compare the code of both file, code is same.
please suggest.

i think this is creating issue, i1 is containing -1 value.
pls suggest

where did you download the StaMPS scripts?

I downloaded from the below link .tar.gz file

I am getting the error in 6 patch procedure, so
I created only 1 patch
Then i run ‘stamps(1,1)’ in matlab, then stamps(1,2) …working fine till “stamps(1,4)”
After finished the processing stamps(1,4), run stamps(1,5) got this error.

During the processing of stamps(1,3) and stamps(1,4), got the warning message “Warning: Not enough random phase pixels to set gamma threshold - using default threshold of 0.3

Please let me know, did i follow the correct procedure?

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