Snap2stamps package: a free tool to automate the SNAP-StaMPS Workflow

Here are some images in the coreg and ifg folders.

The screeshot below shows the parameter settings of the SNAP on my PC.

The path number of the images that I used is 142, and their frame numbers include 106, 108 and 109.

Thank you!

Hi, could I run Stamps with an open source program instead matlab?

unfortunately you can not.

1 Like

hello snap2stamps users
when i ran" python coreg_ifg_topsar.py project.conf"
it reutrned this error:
/media/arash/Elements/InSar/Tracks/130-81
/media/arash/Elements/InSar/Tracks/130-81/graphs
S1A_IW_SLC__1SSV_20160113T142440_20160113T142508_009477_00DBFC_6363.dim
/home/arash/snap/bin/gpt
/media/arash/Elements/InSar/Tracks/130-81/graphs/coreg_ifg_computation_subset.xml

#####################################################################

Coregistration and Interferogram computation started:

#####################################################################

Traceback (most recent call last):
File “coreg_ifg_topsar.py”, line 94, in
for dimfile in glob.iglob(slavesplittedfolder + ‘//’+IW+’.dim’):
NameError: name ‘IW’ is not defined

any help would be appreciated
thanks in advance

in your project.conf file does the parameter IW look like this?

IW=IW2

1 Like

thanks for your response
it’s my config file:
######### CONFIGURATION FILE ######
###################################

PROJECT DEFINITION

PROJECTFOLDER=/media/Elements/InSar/Tracks/130-81
GRAPHSFOLDER=/media/Elements/InSar/Tracks/130-81/graphs
##################################

PROCESSING PARAMETERS

IW2=IW3
MASTER=S1A_IW_SLC__1SSV_20160113T142440_20160113T142508_009477_00DBFC_6363.dim
##################################

AOI BBOX DEFINITION

LONMIN=59.77
LATMIN=27.91
LONMAX=59.97
LATMAX=28.09
##################################

SNAP GPT

GPTBIN_PATH=/home/arash/snap/bin/gpt
##################################

COMPUTING RESOURCES TO EMPLOY

CPU=6
CACHE=12
##################################

my ROI located in IW2 and IW3 so that i enterd IW2+IWD3

about master file i dont know why it must be *.dim file my files are zipped

You have changed the keyword IW1 by IW2… and you should only assign a value after the =

so:
IW1=IW3

As the python scripts parse the project.conf file based on the defined keywords. So please do not modify the left side of the =

It should work after you modify this

If your AOI covers 2 IW
you should run all twice, once per IW
IW1=IW2
IW1=IW3

THe next versions of snap2stamps does solve this problem. It will come soon so please be patient

you will also need to parse the full path to your splitted and corrected master file. So use TOPS-split and apply orbit file on your master first. then put the file path to that dim file in the script. look in my github for instructions.

thanks a lot, Dear DR Jose Manuel Delgado Blasco and gjvanleeuwen
I do that and I ran python coreg_ifg_topsar.py project.conf, python slaves_prep.py project.conf, python splitting_slaves.py project.conf successfully, but python coreg_ifg_topsar.py project.conf command returned this : error log (8.9 KB)
please guide me

Thanks Dear i see it , usefull

coregistration (BackGeocoding) requires a DEM and according to your logfile, your computer is not able to access it " Unable to read SRTM HGT"
Maybe your firewall settings prevent the download of the DEM? Or is your area outside the SRTM coverage?

1 Like

yeah it seems dem file can’t be downloaded, is it possible to download srtm file manualy and provide it to snap2stamps?

you can run it once in the GUI of SNAP and then it is placed in the folder where all DEMs are stored. Once it was correctly downloaded, the script of snap2stamps doesn’t need to do it anymore.

many thanks dear ABraun

Dear all
command :python stamps_export.py project.conf return error log2 (2.6 KB) message and ended to " done.
– org.jblas INFO Deleting /tmp/jblas8230149325969393996/libjblas.so
– org.jblas INFO Deleting /tmp/jblas8230149325969393996/libjblas_arch_flavor.so
– org.jblas INFO Deleting /tmp/jblas8230149325969393996

[5] Finished process in 13.5770061016 seconds.
Stamps export of 20160113_20160605_IW1.dim successfully completed."

is it ok? or some things happened incorrectly?

yes documentation for this is in the github and it’s also recommended to use an external dem or download the same DEM as snap and provide it yourself.

you can just change the graphs of snap2stamps and change the DEM lines

for me it normally takes around 12-15 seconds per slave aswell so that seems fine, the commands above look to be just notes that the program deletes files in those folders because they were not empty.

1 Like

I completed the process in snap and export results to stamps but when I check patch folders and pscand files are empty, I opened ifgs in snap gui unfortunately only a purple image is shown, processed ifg’s are corrupted. how can I fix it?

since you already had problems with the DEM i think this is the first thing you should look at.

try downloading a DEM covering your area, put it in WGS 1984 unprojected coordinate system and supply the full path to the dem in the snap graph files using the documentation in the github.

you can also scroll back in this forum searching for external dem to see how you can do it.

  • how long did it take to process 1 interferogram? any error log of the coreg_ifg_topsar.py process aswell?

goodluck!

External DEM should be geotiff

2 Likes