SNAP2StaMPS version 2: new features and new sensors supported

Hi all, I have a problem when I run “python topsar_step_2_splitting_secondaries.py -F project_topsar.conf”, the script runs without any problem or error and even creates the “split” folder, but it is empty. The path is right.

Someone had this problem? it is Step 2: Splitting Secondaries.

I have SNAP v9.0, SNAP2STAMPS v2.0, and Python 3.12 on Windows.

The following pictures are the configuration of project_topsar.config and the script output.


I see where the issue is.
In your configuration file you declared a manually processed Master Image (as done in SNAP2StaMPS v1)

In SNAP2StaMPS v2, the MASTER entry n the PROJECT folder needs to point only to the MASTER folder, which needs to be populated with the original SLC zipped files (or SAFE) that need to be processed using the topsar_step_1_split_masterXXX

Based on their generated master split (how many IWs intersect your WKT), will run the rest of the steps 2 and 3.
Please do that and run topsar_step_2 after that.
Best,

José Manuel

1 Like

Hi Jose Manuel, I tried it as you told me and it was excellent! Thank you very much for your quick and accurate response; by the way I want to congratulate you for all the achievements of this forum and SNAP2STAMPS.

I will keep working on the workflow :star_struck:

1 Like


can sone help me how to solve tgis issue

Hai all, I have a problem when running topsar_step_1_splitting_master_multi_IW.py. I use Mode : AUTO for selecting the master image, then copy manually to folder ‘Master’. I have SNAP v9.0, SNAP2STAMPS v2.0, and Python 3.12 on Windows. The following pictures capture the master folder, project_topsar.config and the script output.



My guess is that the path on the project configuration file does not finish with MASTER (as in the folder screenshot) but as Master, so it is not found.

Can you please check that?
Best,

I have adjusted Master to MASTER, but the result is still the same error. Can I use the manual split results using Snap software? Will it affect the configuration and interferogram creation stages?



Yes, you can use the manual approach as in SNAP2StaMPS v1, but please save the result in the MasterSpllit folde the master splitter with the naming convention:
MASTERDATE_IWx.dim, e.g. 20150404_IW1.dim and 20150404_IW2.dim

test@server:/media/suri/GPS_LAB1/banglore/bin$ python3 topsar_step_3_coreg_ifg_topsar_smart.py -F project_topsar.conf
BBOX
POLYGON ((7.43 51.20,7.57 51.20,7.57 51.28,7.43 51.28,7.43 51.20))

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

Coregistration and Interferogram computation started:

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

Simply it is showing above one, not running anything and not showing any error.
Please let me know the error.
project_topsar.conf (1.7 KB)

Dear suribabu,

A bit more of information would help.
Was the topsar_step1 and topsar_step2 successfully completed?

Best,

No. Manually I created Master as per older version.

Manually I created MasterSplit folder, then I split and orbital corrected master image using SNAP, later I added that like below,

MASTER = /media/suri/GPS_LAB1/banglore/MasterSplit/20220707.dim in project_topsar.conf

after that I created secondaries folder, then i kept all the .zip file into that folder.

Then I try to run the topsar_step_2_secondaries.py -F project_topsar.conf
it is giving below error.

test@server:/media/suri/GPS_LAB1/banglore/bin$ python3 topsar_step_2_splitting_secondaries.py -F project_topsar.conf
BBOX
POLYGON ((76.6331 10.9382,78.6051 10.9382,78.6051 13.8138,76.6331 13.8138,76.6331 10.9382))

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

TOPSAR Splitting and Apply Orbit

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

[1] Folder: S1A_IW_SLC__1SDV_20200424T004003_20200424T004031_032262_03BB7A_E72F.zip
/media/suri/GPS_LAB1/banglore/secondaries/S1A_IW_SLC__1SDV_20200424T004003_20200424T004031_032262_03BB7A_E72F.zip
[]
707
Outname:S1A_IW_SLC__1SDV_20200424T004003_20200424T004031_032262_03BB7A_E72F.zip_707.dim
[‘/home/suri/snap_software/snap/bin/gpt’, ‘/media/suri/GPS_LAB1/banglore/graphs/splitgraph2run.xml’, ‘-c’, ‘118G’, ‘-q’, ‘30’]
INFO: org.esa.snap.core.gpf.operators.tooladapter.ToolAdapterIO: Initializing external tool adapters

INFO: org.esa.snap.core.util.EngineVersionCheckActivator: Please check regularly for new updates for the best SNAP experience.

Error: /media/suri/GPS_LAB1/banglore/graphs/splitgraph2run.xml (No such file or directory)

[1] Finished process in 5.751559257507324 seconds.

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

I checked in graphs folder but splitgraph2run.xml file is not there.

Thanks.
project_topsar.conf (1.7 KB)

Now it is running.
I kept master image zip file in Master folder.
and all the remaining zip files in secondaries folder.

Then I run from step_0 onwards, it is running fine now.

Now I have a doubt, If we keep all the zip files in one single folder (like master+secondaries zip files), is this code will separate the master and secondaries?

Thanks.

1 Like

There is an auto_master script that it can also be used. It is included in the auto_run script.
I may spend some more time on better documenting the new version, as you highlighted, the old way of doing the Master (still valid for v2 but naming need to match with what expected in v2)

Glad to see you went over the issue and your processing works now.
Best,

2 Likes

Hi dear @mdelgado can this version be used for sentinel-1 images the same as previous version?

Sure!
And it allows the AOI to be withing different Subswaths, being the minimum AOI covering 1 single burst!
Version 1 needed at least 2 bursts to work.

It is not extensively documented in the github page, but it is not a huge difference. The main difference goes into the Master image naming etc, as you have seen in the previous messages.

But I suggest you to check it out.
Best,

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

Coregistration and Interferogram computation started:

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

N masters:2
Checking N bursts in file /media/rakesh/sairam_sir/new_ahmedabad/MasterSplit/20220216_IW2.dim
Line 5374 :
6
graph :/media/rakesh/sairam_sir/new_ahmedabad/graphs/topsar_coreg_ifg_computation_extDEM.xml
/media/rakesh/sairam_sir/new_ahmedabad/MasterSplit/20220216_IW2.dim
IW2
/media/rakesh/sairam_sir/new_ahmedabad/split/20160927_IW2.dim
[1] Processing secondaries file :20160927_IW2.dim

20220216_20160927_IW2
Traceback (most recent call last):
File “/media/rakesh/sairam_sir/new_ahmedabad/bin/topsar_step_3_coreg_ifg_topsar_smart.py”, line 195, in
filedata = filedata.replace(‘EXTERNALDEM’,extDEM)
TypeError: replace() argument 2 must be str, not None

Please uncomment the line related the EXTDEM from your project configuration file. I believe you commented it. Please undo and run again.
Best,

image

1 Like

Thank you for your support. It’s working

1 Like

resolved the “libgfortran.so.5: cannot open shared object file: No such file or directory” error using

sudo apt-get update
sudo apt-get install libgfortran5