Workflow between SNAP and StaMPS

@ABraun how to fix this problem ? There are some errors when I doing steps 6 in StaMPS

Dear Katherine
I want to know if we have negative heading , it sholud be converted into positive.
Regards
Antonella

Hi everybody,

In the parm file in ‘‘rslc’’ folder created by SNAP, the heading is 189.43° (or nearly -175° counterclockwise), but in the metadata of the Sentinel-1 the heading is -165° (or nearly 200° clockwise). Does anyone know what could be the cause of 10-degree discrepancy?

@reyhanrere

Did you figure out a solution or work around to the ‘indices must be…’ error you encountered in step 6 you could share? I’m having the same problem.

Thank you.

Dear @twburns
I deleted .lat and .lon generated from TopoPhaseRemoval and replaced it by creating lon and lat from _stack_deburst result.
So before I delete I have 2 .lat files (.lat and .lat.par) and 2 .lon files (.lon and .lon.par) and after I delete and change them, I have 1 .lat file (master_date.lat) and 1 .lon file (master_date.lon).
I hope this will help you and others
Thanks

Dear all,

You may be interested in using the snap2stamps package.

Have a look at this thread: Snap2stamps package: a free tool to automate the SNAP-StaMPS Workflow

Enjoy!

2 Likes

the same problem here

Hi @annamaria I have the files in their respective folders in STAMPS directory. But I can´t run STaMPs as the manual says. There’s a trick for this? (I have modified the Mt_prep_gamma and the config.bash files in order to prepare them for matlab)
Thanks in advance

Hi SAR colleagues

I have done a 34 SLC images stack using the algortithm proposed in the html SNAP to StaMPs manual. I’ve sorted many problems just reading this great thread (my first Linux experience,and in Azure, for worst), but I’m stucked now in the launch of StaMPs. I have all the files properly saved in their directories, but I’m still confused with. According the manual, you have to run StaMPs from terminal, and according to simple algorithm posted by @katherine, you coul do it from matlab.
Please, any help will be appreciated.
Thanks and regards

I just ran mt_prep_gamma and it throws the next error
pmatuser@DataScienceSAR3:~/StaMPS_v3.3b1$ mt_prep_gamma snap 20171212 /media/datadrive/SAR/PSI_SBAS/SANTIAGO/INSAR_master_date/ 0.4
mt_prep_gamma Andy Hooper, December 2012

Amplitude Dispersion Threshold: /media/datadrive/SAR/PSI_SBAS/SANTIAGO/INSAR_master_date/
Processing 0.4 patch(es) in range and 1 in azimuth

20171212/*slc/snap.*slc.par: No such file or directory.
20171212/*slc/snap.*slc.par: No such file or directory.
ls: cannot access ‘20171212/slc/.*slc’: No such file or directory
cat: /home/pmatuser/StaMPS_v3.3b1/calamp.out: No such file or directory
@: Badly formed number.

If I list the archives in the rslc folder, I can see the 20171212.rslc and 20171212.rslc.par files
pmatuser@DataScienceSAR3:/media/datadrive/SAR/PSI_SBAS/SANTIAGO/INSAR_master_date/rslc$ ls
20170522.rslc 20170826.rslc.par 20171212.rslc 20180318.rslc.par
20170522.rslc.par 20170907.rslc 20171212.rslc.par 20180330.rslc
20170603.rslc 20170907.rslc.par 20171224.rslc 20180330.rslc.par
20170603.rslc.par 20170919.rslc 20171224.rslc.par 20180411.rslc
20170615.rslc 20170919.rslc.par 20180105.rslc 20180411.rslc.par
20170615.rslc.par 20171001.rslc 20180105.rslc.par 20180423.rslc
20170627.rslc 20171001.rslc.par 20180117.rslc 20180423.rslc.par
20170627.rslc.par 20171013.rslc 20180117.rslc.par 20180505.rslc
20170709.rslc 20171013.rslc.par 20180129.rslc 20180505.rslc.par
20170709.rslc.par 20171025.rslc 20180129.rslc.par 20180517.rslc
20170721.rslc 20171025.rslc.par 20180210.rslc 20180517.rslc.par
20170721.rslc.par 20171106.rslc 20180210.rslc.par 20180529.rslc
20170802.rslc 20171106.rslc.par 20180222.rslc 20180529.rslc.par
20170802.rslc.par 20171118.rslc 20180222.rslc.par 20180610.rslc
20170814.rslc 20171118.rslc.par 20180306.rslc 20180610.rslc.par
20170814.rslc.par 20171130.rslc 20180306.rslc.par 20180622.rslc
20170826.rslc 20171130.rslc.par 20180318.rslc 20180622.rslc.par

Dear @CarlosSierralta,
When you said… “I have modified the Mt_prep_gamma” , how had you done it exactly?

As I have already replied yesterday in this thread: Snap2stamps package: a free tool to automate the SNAP-StaMPS Workflow , you only need to modify the s by an f on the lines there mentioned.
Let me know and you still have the problem after trying that, I will share with you my modified script.

Regarding matlab, it can be run via GUI or via command line if you run it with the -nodesktop option.

I hope that this helps!

I’ve modified this data directory structure, for the paths I’m using:

Expected directory structure:

PS:

rslc/*.rslc

rslc/*.rslc.par

diff0/*.diff

diff0/*.base

geo/*dem.rdc

geo/*diff_par

geo/YYYYMMDD.lon (master)

geo/YYYYMMDD.lat (master)

dem/*_seg.par

SB:

SMALL_BASELINES/YYYYMMDD_YYYYMMDD/YYYYMMDD.rslc (master)

SMALL_BASELINES/YYYYMMDD_YYYYMMDD/YYYYMMDD.rslc (slave)

SMALL_BASELINES/YYYYMMDD_YYYYMMDD/*.rslc.par

SMALL_BASELINES/YYYYMMDD_YYYYMMDD/*.diff

SMALL_BASELINES/YYYYMMDD_YYYYMMDD/*.base

geo/*dem.rdc

geo/*diff_par

geo/YYYYMMDD.lon (master)

geo/YYYYMMDD.lat (master)

dem/*_seg.par

Regards

You use wrongly the command… still not clear why you write snap as a first parameter… the command should be launch as follows:

mt_prep_gamma 20171212 /media/datadrive/SAR/PSI_SBAS/SANTIAGO/INSAR_master_date/ 0.4

note that there is no snap written on this command. Still not clear why you included it
and please modify the command mt_prep_gamma as mentioned on the thread :Snap2stamps package: a free tool to automate the SNAP-StaMPS Workflow

It should work.
Please let me know.

pmatuser@DataScienceSAR3:/$ mt_prep_gamma 20171212 /media/datadrive/SAR/PSI_SBAS/SANTIAGO/INSAR_master_date/ 0.4
mt_prep_gamma: command not found

Isn’t working. When I use the snap command, at least the command run (I’m using ubuntu17.10)
mt_prep_gamma snap 20171212 /media/datadrive/SAR/PSI_SBAS/SANTIAGO/INSAR_master_date/ 0.4
mt_prep_gamma Andy Hooper, December 2012

Amplitude Dispersion Threshold: /media/datadrive/SAR/PSI_SBAS/SANTIAGO/INSAR_master_date/
Processing 0.4 patch(es) in range and 1 in azimuth

20171212/*slc/snap.*slc.par: No such file or directory.
20171212/*slc/snap.*slc.par: No such file or directory.
ls: cannot access ‘20171212/slc/.*slc’: No such file or directory
cat: /home/pmatuser/StaMPS_v3.3b1/calamp.out: No such file or directory
@: Badly formed number.

This is a huge headache, thanks for helping with it

this originates from updated scripts provided by katherine back in October 17 who was also in contact with Andy Hooper. Together they modified mt_prep_gamma so that it matches the outputs of the SNAP export. Workflow between SNAP and StaMPS

Now that snap2stamps is available it is probably worth to see which of them is the one to use best in the future because there are ovisously some differences and probably not both work with the routines provided.

@ABraun
I guess you talked about the mt_prep_gamma_snap (one single word) and not mt_prep_gamma snap (two words)
As you can see in Carlos post, it takes as Amplitude dispersion a path instead of a threshold.

I look forward for an official mt_prep_snap comming from StaMPS, so people stops to be confused about it.

For me even the Katherine scripts work fine, but I remember to get still an issue with the singlecomplex and not floatcomplex format.

Please see attached the file I use. It works perfectly for me.
Cheers,
mt_prep_gamma_snap(changed) (6.4 KB)

sure, it doesn’t make sense without the underscore but I think that this is what Carlos meant. But yes, it needed to be pointed out still, thank you.

@ABraun @mdelgado Thanks! I will try it right now. I will overwrite the previous mt_prep_gamma file with this one and let you both know

I guess there is a problem with the config.bash file that I’ve modified wrongly. Plus, there are some software I do not have installed (I have installed Doris, Triangle, csh, snaphu, pygeoj, etc)

Are all of those software listed in config.bash needed?

Thanks again @ABraun @mdelgado

if you prepared your interferograms in SNAP, you don’t need most of them. snaphu is required for unwrapping (called from matlab later) and triangle as well, if I remember correctly.

1 Like