Workflow between SNAP and StaMPS

Hi everyone. First of all, many thanks to you for your kindly help for all questions.

My problem is about StaMPS export. I am using 15 Envisat IMS_1P SLC data. One of them is Master and the others are Slave. First, I coregistered these data succesfully, then I applied Interferomgram Formation and after Topographic Phase Remove. I followed instructions which are I picked up from this forum. But I got an error, could you give me an advice to fix it? Thanks.

2 Likes

I personally would try to remove all name parts starting with _2009_ifg_srd_, then save the product an run again.

I fixed the error by deleting the same name products. I have two 2012_03_15 image with different path. Then I deleted one of them, PSI export processing started. Thanks.

I am using GMTSAR for interferometric processing and SBAS processing. Also, i am trying to import the generated unwrapped interferograms from GMTSAR into GIAnT software package in order to compare the different SBAS results.

Hi @bayzidul I finally achieved to export StaMPS .dem. rslc. .geo and .diff folders and I installed StaMPS same with you and got same messages. But I do not know how should I do first? I have to do all chapters in manual or could you give me an advice? For example how can you got PATCH.X files. I guess I need to get PATCH.X files then I will run MATLAB stamps.m ? Is it true? Thank you.

Hi @Fikretjfm
Honestly, I have tried all possible ways to do it but my problem remains same for both platform CYGWIN and LINUX (see my last message with screenshot). If you could run the first script (mt_perp_gamma_snap or mt_prep_gamma_snap(changed) by @FeiLiu ) then you should have PATCH file and other files. Probably @AranLarra @falahfakhri @FeiLiu @annamaria @katherine or someone else could provide us a screenshot of the terminal with code how they are running the first script and also a screenshot of the folder (containing all the file) after running. Then we have to run the second script in Matlab.

If you read previous sms (or the word documnet by @falahfakhri ) then you will understand all situations and you could see that TopoPhaseRemoval has problem with Stack processing. Therefore, I am now doing everything manually as mentioned @AranLarra and only then I can let you know my status by the weekend.

Cheers
Bayzidul

1 Like

@bayzidul ps_load_initial_gamma_snap.m and mt_prep_gamma_snap must be in StaMPS installation directory not in your working directory.
In particular:
mt_prep_gamma_snap must be in /bin,
ps_load_initial_gamma_snap.m must be in /matlab.

1 Like

Thanks @annamaria, Let me also consider this…

Dear Annamaria,

I added your last notes to the document I have created, so would you please to participate in this until to reach the complete method and steps, then we could add something concerning the installation of StaMPS under cygwin or linux.

In the same time I’d like to draw the attention of all my colleagues that I’m preparing the steps of SBAS using SNAP, in case someone would like to participate.

With my best wishes,

Falah,

PSI USING StaMPS_V_5.docx (186.5 KB)

4 Likes

Dear @ABraun and @MWampach

I met the same error message in the end of the mt_prep_gamma step:
“Error opening file pscands.1.ij”
I have run mt_prep_gamma inside my “export” folder, but nothing change.

Do you know how to solve this problem?

Thank you very very much!

I don’t have a solution for that, I stopped using Windows with StaMPS because of these errors.

Hi @ABraun
But I used Linux system not Windows for processing. With the version of SNAP is v6.0, and the version of StaMPS is v3.2.1.
And another question, the “mean amplitude = nan” is correct?

Thank you!

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

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!


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

Warning

The workflow described in this post (and the ones referring to it later on) is outdated and no longer recommended, because new versions of SNAP and StaMPS have been released. Please have a look at this updated list of instructions: StaMPS - Detailled instructions
#######################################################

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) please do no longer use these scripts, StaMPS was officially updated
mt_prep_gamma_snap(changed) (6.4 KB) please do no longer use these scripts, StaMPS was officially updated

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

18 Likes

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

1 Like

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!

2 Likes

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?

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

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:

Thank you for your reply !!