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

Hi Stoorm,

Looking at the project.conf I see the following:

In which the IW1 needs to have the value defined, but the most important is that in the MASTER it is still present. Not sure how in the xml it is correct… Are you sure you have sent the correct project.conf file?

In addition, can you please check that the file gpt.vmoptions has also the parameter -Xmx larger than the 18G of cache specified on the project.conf?

The coreg_ifg2run.xml seems correct, (still wondering why master and slave are taken correctly despite the IW1 missing on the project.conf with wrong master name on it), so just wondering how the master is taken correctly…

Can you please put some light on it? Which is the correct master name?

File should exist and taken correctly, otherwise no processing will be possible. Could it be the message : No such file or directory due to that?

And finally, could you check if the slave splitting was done properly without defining the IW to process?
Are you sure you sent me the correct file version?

I am still not sure if this is the real cause, so please let me know and we will try to solve it

I apologize for my mistake. I just tried different options to run the script. The screenshot (1.png) in the attachment shows the error when using the script without specifying the subswath number in the name of the master file.project.conf (594 Bytes)
In this case, the correct path to the master file will be /home/insar/1/q/master/20171203.dim
My workstation RAM size are specified in the gpt file.vmoptions larger (22 GB) than cache.
By the way, the file coreg_ifg2run.xml is not created at all if I use the subswath number in the master file name and in the IW1 line together. The error will be such as in the screenshot 2.png
No such file or directory - This is the error that is in the screenshot in the attachment?
When I try to run the splitting script without defining the IW I get the same error as in the screenshot 1.png

Well… wait a moment.
You got the master splitted, ok.
The second step is to get the slaves correctly splitted (having defined the IW1 parameter on the project.conf files as provided)
If you already run it, please verify in the folder related to the splitting, the filename of the splitted slaves (if any)
Only after that you should run step 3 which is the coreg_ifg_computation (and it should work)

As you said, step 3 seems not to work because there was not any splitted slaves on the splitted directory ending with the IW1.dim (in your case).

Can you please try to do it again (step 2 and step 3 ) and let me know?
Please verify that the master file exists in the proper folder with the following content:

Let me know

So, the problem is even more interesting. I checked that all splitted slave files in the project folder have the correct subswath number. But these slave files I processed before my ubuntu system was reinstalled. Before reinstalling all scripts worked without any errors. Now step 2 and step 3 do not work correctly. I tried to run them with different settings and got the results that are in the screenshots. Interesting but step 1 is now working fine.
When you run the script (2,3) it displays an error associated with the
Could there be a problem with it?

Thank a lot for you help!

Well, it could be related to any variation of the function (if any) within the python version.
I have tested the scripts with the OS python 2.7 on CentOS 7 and Ubuntu 16.04.

Which is the Ubuntu version you are using now? Maybe you got an error related to that…
If this is the case, I will include this in the user manual as a software requirement and my suggestion is to use one of the aforementioned linux distros.

Let me know

I tried running scripts using different versions of Python 2.7 (from 2.7.10 to 2.7.15) on Ubuntu 18.04.

May you try with the ubuntu16.04 again as you did previously to understand whether my scripts are version dependent?
Thanks for the effort

Thank you. I will try.

Hi @ABraun
I am sorry to bother you again. I should raise my question here. I encountered the following problems when using . I tried to set the environment variable, and also Checked the project.conf settings ,but i still haven’t solved it .Maybe i still don’t understand what the ‘current folder’ means. I hope you have time for some guidance.


Dear Lamu,
The splitting scripts expect to find the compressed Sentinel-1 products. As seen for your log you have unzipped them.
Please try with the compressed files, or try to modify the script. Just remember that SNAP recognizes either the .zip or the .SAFE/

The LD_LIBRARY_PATH is not the issue.

I hope this helps.

Dear mdelgado,
Thank you very much. According to your suggestion , I have solved my problem . Thanks again .
Best wishes


1 Like

argh, I started the batch processing yesterday night and this morning I found that the shell script got stuch between two images. I had this some time ago already. It only proceeds once I press return. I know this is not related to snap2stamps, I also had this with other software and scripts (on a different PC).

Has anyone experienced this and can offer a solution?
My current solution is to hit return 100 times once the script starts so it will taken by the shell once it gets stuck.

That is weird as these scripts had no command to wait for you to press enter to confirm anything…
Ouh! I am seing that you are running them on Windows!! I have not checked that yet. Well… I supposed that you may have any kind of weird setting on your command line window as you said…

Sorry for that! Let us know as I am very curious

after searching arout a bit I would confirm this is related to Windows and the necessity to flush the output every now and then. I haven’t tried but I could imagine insertint that line after each print statement in your code to see if it changes.

1 Like

Well…in such a case you can comment the print lines on the code, so at least the processing will go ahead.
You can always check later on the log files how went the processing .

that’s true, thank you. It doesn’t happen very often but yesterday I was remembered again that it exists :wink:

Still, I am glad to see that my scripts are able to run also for Windows OS.

Could you please tell me whether special settings or extra packages were needed to install ? Over which Windows distro are you running? Windows 7, 10? So I can update the info on the next software release ?

Thanks again for helping me to improve it.

Once I understood the general concept (thanks for your many helpful comments), it worked right away on three different machines, all Windows 10.

1 Like

hello,i am trying to use the tools but cannot insatll pathlib by pip, can you give me some advice

please describe your problem a bit clearer, so we can think of solutions.

Have you installed pyhton? If not, the most suitable way is Anaconda:
It includes pip and other useful tools and has most of the required libraries.