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

Hi,
I am having a similar error in step 5 of stamps:
image

The error line is related to stamps.mat:
movefile(‘patch.list’,‘patch.list_old’,‘f’);

I cannot find the patch.list_old so I cannot solve the problem.

The weirdest thing is some subsets of images work without having this error.

PS: I am using matlab in Windows (after, of course, having change the path of all files)

Thanks

It is weird but it could be something related to the available disk space or file permission.

1 Like

I think I have the same problem, but I do not understand well the modification that I should have to do, so I send the images of the error received.






I’m sorry to ask the same question again if the solution is really the same as the one already given before

the subset is pretty small - I can’t tell if this is the reason for the error, but I would take an area which is at least 4 times bigger. It will still be quite small regarding file size.

Thank you for the answer, I was already dreaded because that was the possible problem, I will try to do it something bigger.

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

1 Like

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: