Workflow between SNAP and StaMPS


#151

Hello mam, sorry to disturb you. i would like to know which version of linux will work with STAMPS and GMTSAR?
please suggest me to go on with it.
Thank you for your help
vishnuvardhan


#152

Dear falahfakhri,
Thank you for your hard work in summerizing everything about using SNAP for PSI! It will be very helpful!
I am happy to share with my first reliable results obtained using Workflow between SNAP and StaMPS. Using 20 S-1 images I managed to fix the landslides which were previously fixed by processing of TSX, Envisat and ALOS data. Even ts graphs are not bad! The landslides are also fixed by ground data.
So it works!


I am glad to share my latest experience to save time for people doing PS processing of S-1 images using SNAP. Below is the short updated discription how I got these results.


snap-stamps
Tips. Use SNAP 6.0. beta (Earlier versions have bugs in Topophase removal). Visually inspect results of each step to be sure everything is OK. Try a small subset first.

1/ S-1 images: Split and Apply_Orbit_File. Split is done individually for each image because number of bursts covering the study area vary from image to image and you have to adjust this procedure manually. No batch processing can be used at this step. Apply orbit can be done using batch processing.

2/Create stack using Backgeocoding ( Radar-Coregistration-S-1Tops_Coregistration-S-1Backgeocoding. Master should be the first in the ProductSetReader). 12-13 images are OK for each Stack. If more images in the Stack - it is better to split it into several Stacks each having the same master. Master can be chosen by Radar-Interferometric-Insar Stack Overview.

3/Deburst the result of 2/

4/ Make subset of the result of 3/ (geographical coordinates) (Raster-Subset). Result file: subset_master_Stack_Deb.

5/ Apply Interferogram formation to the result of 4/ -. Result file: subset_master_Stack_Deb_ifg¬.

6/ Apply TopoPhaseRemoval to the result of 5/ . Result file: subset_master_Stack_Deb_ifg_dinsar.

7/ Add elevation band to the result of 6/ : subset_master_Stack_Deb_ifg¬_dinsar .

8/ Do Terrain Correction (TC) of the two products: subset_master_Stack_Deb and subset_master_Stack_Deb_ifg¬_dinsar
check boxes : output complex data and Latitude&longitude (when doing TC of subset_master_Stack_Deb). Without TC results of Stamps may be shifted in a strange way.
9/ Export data for StaMPS: Radar-Interferometric-Psi/sbas-StaMPS export
I exported to StaMPS the two files: subset_master_Stack_Deb_ifg_dinsar_TC and subset_master_Stack_Deb_TC . After the Stamps Export procedure I got four directories /diff0, /geo,/dem,/rslc which I placed into the directory INSAR_master_data. In case of several Stacks export each Stack and then copy results to the directories directories /diff0, /geo,/dem,/rslc.

10/ To have PS geocoded export subset_master_Stack_Deb_TC (with latitude and longitude bands) to ENVI or GAMMA format. Save result, for example, to /geo directory. Rename files with lon and lat to master_data.lon and master_data.lat. These are binary files with latitudes and longitudes for all pixels of the master crop. (One file contains values of lat for all pixels and the other - of lon) All the other files (results of export of the other bands) can be deleted. The files master_data.lon and master_data.lat should be placed into /geo directory.

You can also add longitude and latitude bands to subset_master_Stack_Deb, then do TC and get subset_master_Stack_Deb_TC_lon_lat. Export this to ENVI or GAMMA format.
Then like in 10/
There is a bug when exporting to Stamps TC results. You always get wrong value of heading in masterdata.rslc.par (it is always equal to 180deg) and thus in StaMPS. The easiest way to overcome this is to change “heading” in /rslc/masterdata.rslc.par manually to a correct value.
10/ Place the new scripts mt_prep_gamma_fei (changed by FeiLiu) to the /bin directory of StaMPS and ps_load_initial_gamma (changed by FeiLiu).m to the StaMPS matlab directory. ps_load_initial_gamma(changed).m (5.8 KB)
mt_prep_gamma_snap(changed) (6.4 KB)
Rename them into mt_prep_gamma and ps_load_initial_gamma.m correspondingly.

11/ run mt_prep_gamma from the INSAR_masterdata directory. mt_prep_gamma masterdata /fullpath to the INSAR_masterdata directory 0.4
12/ run matlab and launch StaMPS.
Try first step of stamps (1,1) - to be sure that all data are imported properly. Then continue.
No principal changes in Stamps parameters should be done. Even with default values I managed to get reliable results. Although to improve results adjustment of Stamps parameters is certainly necessary.
Good luck!


Many thanks to the developers and people who shared their experience in adjusting this soft!

How is your work on SBAS export? I will be glad if I can help. I am not an expert in writing scripts but I can test.

All the best,
Katherine


Problem with StaMPS installation using Linux
About the STaMPS category
How to prepare Sentinel-1 images stack for PSI/SBAS in SNAP 5
How to prepare Sentinel-1 images stack for PSI/SBAS in SNAP 5
How to prepare Sentinel-1 images stack for PSI/SBAS in SNAP 5
Error '0' when using coregistration
About the STaMPS category
#153

good job and thank you for sharing! Maybe this is also a nice opening for the Show Room :smiley:


#154

Just a little tip:

It seems that, in SNAP v6, the interferogram formation and topophaseremoval steps can be merged. Indeed, in the interferogram formation panel you can choose to substract the topographic phase and choose the corresponding DEM. That saves time, and in my case the results seem coherent!

Anyway, thank you so much for your help, and I also hope that SBAS export will soon be available!


#156

Dear @bayzidul, @ABraun, @FeiLiu, @annamaria, @katherine…,

I have successfully get PSI result from StaMPS with 70 sentinel-1 images by using SNAP 6.0 PREVIEW4.

Now, I’m trying to process with SNAP 6.0 PREVIEW5 and met some problems.

I found that in PREVIEW5, we couldn’t put the products with Terrain Correction (stack_deb_TC and stack_deb_ifg_dinsar_TC) in stamps export. It would have error like this:

So, I just put “stack_deb” and “stack_deb_ifg_dinsar” for stamps export. After this step, we could directly get master_date.lon and master_date.lat in the geo folder.

And then processed in StaMPS, it took very long time (over one day) in step 6 so far. It didn’t fail, still running now, but I think it’s not a normal condition for just 12 images.

I also have tried to replace the master_date.lon and master_date.lat files generated by stamps export automatically by the method we got these files before. But it failed in StaMPS step7.

Have anyone test to process with SNAP 6.0 PREVIEW5?


How to prepare Sentinel-1 images stack for PSI/SBAS in SNAP 5
How to prepare Sentinel-1 images stack for PSI/SBAS in SNAP 5
#157

I have same problem, too.
Dose anybody know what cause this problem?


#158

dear @sharon, no sorry.
i used only preview4. I think that it is importan report the issue (about TC export) to developers in this topic. Issues/Observations/Comments of SNAP 6.0 Beta :wink:


#159

Thank you for your reply !!


#160

Hello,

I’m having the same problem (error when adding the terrain corrected stacks to the STAMPS export tool). Do you know if it is still possible to download SNAP 6 preview 4? I can only find preview 5 on the download page.


#161

Hi @tdb. I don’t know.
You might ask for in this topic.
http://forum.step.esa.int/t/issues-observations-comments-of-snap-6-0-beta/6722?u=annamaria


#162

The link to download preview 4
http://step.esa.int/downloads/6.0-pre4/


#163

The problem with PS point visible on water is related to the lon/lat export, which is currently not fully correct.
We are working on it


#164

Hi @mfitrzyk .
What does it mean not fully correct? There are shift problems with lat/lon band export or coregistration problems? please, let me know.


#165

@annamaria @cwong is currently investigating it but it seems that the lat/lon band is not correctly exported in Stamps export. There are some artifacts/blanks in the lon/lat band
We are working to fix it as soon as possible


#166

@katherine you are performing TC before exportting to Stamps. Isn’t it that you need to export in radar coordinates and add this lon/lat bands to process in Stamps ?


#167

@mfitrzyk, I use same workflow of @katherine.
It would not be necessary to use TC before Stamps export, but using Snap’s products without TC, there are shift problems in StaMPS and pixels seem warped.

is currently investigating it but it seems that the lat/lon band is not correctly exported in Stamps export.

Sorry, i don’t undestand where is the problem. Lat/lon bands are exported in binary file (in my case, in gamma file) with File->Export->Sar formats -> Gamma, so it is indipendent by StaMPS export tool.


#168

Ok. The Stamps export is also doing it - saving lon/lat - so you dont need to save it separately.
I would need to look how @katherine is doing it to be able to say something more


#169

Sorry for the trouble @mfitrzyk.
I used Snap, versions 5 and 6 - preview4 (under unix-ubuntu), but these versions do not export the bands lat/lon. Are you using a new preview?


#170

Dear Magdalena,
Normal procedure is to export to StaMPS SNAP products in radar coordinates and then export to gamma or ENVI format lon/lat bands of the master (Deb). But without TC as Annamaia has already written the PS location is warped.
Katherine


#171

Dear Magdalena,
I also tried to save lon/lat using the Stamps export but lon/lat bands were not exported. So I saved them separately.
Katherine