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

I am not sure that this does not look as a StaMPS error… but something more system related.
Can you check about the involved files or permissions?

Before that step 5… what are the log of precedent steps for each PATCHes?
And… are you running StaMPS on Windows OS? Maybe it could be related to that. @Abraun, had you faced something similar?

not so far, sorry. I was always using Linux.

I am running StaMPS on Windows OS. I was able to get past step 5 by adding a few lines of code to stamps.m that checks for opened files and closes them before the calls to movefile(). I now am able to get to step 8, at which point in the script ps_scn_filt, the following error occurs:

"STAMPS: ########################################
STAMPS: ################ Step 8 ################
STAMPS: ########################################
STAMPS: Directory is D:\snap\for_snaphu\test_8_Mar5\r0

PS_SCN_FILT: Starting
Estimating other spatially-correlated noise…
GETPARM: unwrap_grid_size=200
GETPARM: scn_time_win=365
GETPARM: scn_deramp_ifg=
GETPARM: scn_wavelength=100
GETPARM: drop_ifg_index=
GETPARM: small_baseline_flag=‘n’
Number of points per ifg: 26384
‘triangle’ is not recognized as an internal or external command,
operable program or batch file.
Error using fgets
Invalid file identifier. Use fopen to generate a valid file identifier.

Error in fgetl (line 32)
[tline,lt] = fgets(fid);

Error in ps_scn_filt (line 73)
header=str2num(fgetl(fid));

Error in stamps (line 545)
ps_scn_filt"

Looking at my working directory, there is no file by the name scnfilt.2.edge, which the script is looking for. Do you have any suggestions, or thoughts as to where something might have gone wrong?

Thank you.

2 Likes

I don’t know if this caused the error but shouldn’t triangle be compiled and available to matlab somehow?
On the other hand, you wouldn’t have gotten to step 8 if this was a problem…

1 Like

That is it. I just downloaded triangle (https://www.cs.cmu.edu/~quake/triangle.html) and compiled it for windows (https://stackoverflow.com/questions/16439654/how-can-i-compile-triangle-using-makefiles-on-a-windows-machine), and everything finishes. Thanks for all of the help!

1 Like

sounds good!

Did you also run the mt_prep_snap scripts under Windows?
Would be the first case (at least which I know) in which the whole processing chain technically works without errors outside Linux.

Yes, I ran mt_prep_snap, and everything else, under Windows 10. I had to install cygwin and ran it with tcsh. Thanks again.

2 Likes

good to hear, congratulations :wink:

it would be great if you can put up ur work as a step by step process as it would be much useful for the ones using stamps in windows and i am desperately waiting for it… Because i am so confused with stamps…

i have done stamps export in SNAP for PSI… and i dono how to proceed after this in windows… can you help me please…

first you have to install snaphu, triangle, matlab as listed in the StaMPS manual
https://homepages.see.leeds.ac.uk/~earahoo/stamps/StaMPS_Manual_v4.1b1.pdf

You can skip the other modules (DORIS, ROI_PAC) because these steps are skipped by the preparation with SNAP.

1 Like

i already have snaphu and matlab installed… I should install triangle now… What about stamps?? i should install that too ryt?

i downloaded triangle but i dont see any file for installation

Did you check up the tutorial by @thho, the installation is very clear and step by step, in case you’re working under cygwin or/and under Linux.

i saw it but i couldn’t understand as it is much focussed on linux… I need it with windows… so i am unsure what i am supposed to do

Is it possible to make your computer double boot?, in this case you’ll overcome many problems. The aforementioned tutorial then fit to your case.

1 Like

StaMPS was developed for Linux. If you want to run it in Windows you will have to do the translation work by yourself. Currently, no instructions are compiled on how to accomplish this from a-z but ttolhurst gives an advise on triangle above. I agree with @falahfakhri that running in Linux solves many problems regarding the installation. Basic Linux handling and knowledge on command line scripting is still required.

With StaMPS you reach levels of processing that are no longer featured within a graphical user interface, at least when provided for free. Commercial software like ENVI SARScape or SARPROZ allow PS processing in a graphical user interface.

i am planning to double boot my system…

should i install matlab in linux environment after double booting? i have snap, matlab in my windows OS…

I think all the requested software, and plugins should be under the same environment, Under Linux,

1 Like