I noted that the latest version SNAP 5 had included PSI/SBAS. I have some coregisted S1 TOP SLC pairs(created by TOPS Coregistration) ready to create a stack for PSI/SBAS. Howerver the “Create Stack” told me that “S1 TOPS SLC products should use TOPS Coregistration”.
So how should I do?
Thank a lot!
please have a look at this topic, especially lveci’s post:
Thanks for your help
I have prepared interferograms from sentinel 1 SLC IW images by TOPSAR COREG INTERFEROGRAM IW in snap. And now i don’t know how to deal with PS processing in STAMPS. In the manual, the steps are not very explained in detail. Please help me
Below is a description of what I did to get results for a case when a study area is within one IW swath. I also attach AndyHooper’s modified scripts to prepare data for StaMPS (mt_prep_gamma and ps_load_initial_gamma) which takes into account geocoding of pixels from SNAP. Andy kindly allowed to share these scripts. I think other people can use my experience to save their time.
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/ Prepare data for StaMPS: Radar-Interferometric-Psi/sbas-StaMPS export
I exported to StaMPS the two files: subset_master_Stack_Deb_ifg_dinsar and subset_master_Stack_Deb . 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.
9/ To have PS geocoded add lon and lat bands to the result of 4/ ( subset_master_Stack_Deb). (Right click -band maths-edit expressions-constants-lon (then lat) (uncheck “virtual” to save expression). Export result 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.
10/ Place the new scripts mt_prep_gamma to the /bin directory of StaMPS and ps_load_initial_gamma.m to the StaMPS matlab directory.
11/ run mt_prep_gamma from the INSAR_masterdata directory.
12/ run matlab and launch StaMPS.
Hope this helps
ps_load_initial_gamma_snap.m (5.46 KB)
mt_prep_gamma_snap (6.42 KB)
Thanks Ekaterina for your response i begin following your instructions. In
case of facing any issue i’ll contact you.
How to proceed for staMPS if my study area is covered by 2 IW sub swaths?
I followed the workflow kindly provided by @katherine to get the files ready for StaMPS. I am wondering if any of you got the same error as me in the last step “StaMPS export”:
The error message says:
The product ‘subset_0_of_20151110_Orb_Stack_deb’ already contains a band with the name ‘i_20141221_rslc’.
I checked and there is no band with such a name in my product.
Did this error occur to any of you and do you know how to fix it?
All the best,
In the step 5, i think you have to apply interferogramme formation operator on the step 2’s results (the backgeocoded stack ) not on the 4 (subset_master_Stack_Deb)
"Deburst both the backgeocoded stack and the interferogram stack"
And what about the ESD operator , can you apply it after backgeocoding ?
"Generally the backgeocoding is accurate and the ESD can provide a pixel or sub-pixel shift to improve the coregistration"
I’ve gotten a similar error. Since the error message is a quite puzzling it took me a lot of time to figure out what was happening.
After debugging the code of that operator I found out that I had two bands in my stack with the same dates of acquisition (by the way, the date in question was the date in the error message!).
After I’ve removed one of them everything went well.
I have tried to apply interferogram formation operator on the step 2’s results (the backgeocoded stack ), @Abdel have mentioned above, but I got an error that apply interferogram formation on debursted stack didn’t get.
And from the steps @katherine provided, I also got an error at step 8 (StaMPS export) like this “The product … already contains a band with the name ‘i_201150408_rslc’.”
I have checked that there didn’t exist two bands in my stack with the same dates.
Please help me to deal with these problems, thank you!
the first problem is due to the existence of one or many images, in your stack, with sensing dates are befor Mars 2015, and the other images dates are after. To get ride of this proplem you have to apply the EAP correction (Radar-> S1-Tops -> EAP phase correction) on all your images that are sensed befor mars 2015 and start again from step 1.
I don’t understand very well.
Why I need to apply the EAP correction when I make interferograms before deburst? If I deburst first and then make interferograms, there won’t appear this error.
Thank you for your help! ^^
I have successfully export the data for stamps by following step:
Split and Apply_Orbit_File ==> Apply the EAP correction that sensed before March 2015 ==>Coregistration-S-1Backgeocoding ==> Interferogram formation ==> Deburst ==> TopoPhase Removal ==> Add elevation band ==> StaMPS Export
But I only got three folders - diff0、geo、rslc. I didn’t get the folder of “dem”.
Could anyone help me? Thank you very much!
you have to add an elevation band to the interferogram product before the export (right-click > add elevation band, then save the product)
Yes, I have added an elevation band after topophase removed. But I didn’t save it before export. I will try it later! Thank you!
I keep getting the same error in both Windows and Linux and I think my data structure is somehow not correct:
What I did:
- create S1 stack with lat/lon bands (later placed in the geo folder)
- create interferogram, removed topographic phase, and added an elevation band
- StaMPS export creating dem, diff0, geo, rslc
geo folder (here I am not sure if i named the lat/lon files correctly)
I then open the linux terminal (or cygwin respectively) and run
mt_prep_gamma 20150728 data 0.4 2 2 50 200
This works fine until the selection of persistent scatterers (mt_extract_cands)
It is stated that data/rslc/20150728.rslc cannot be opened but it is located in that directory and was also correctly used in the previous step (mt_prep_gamma).
Am I missing something? Did i run the script from the correct location or should the file structure somehow different? I also looked in the code of
mt_extract_cands but couldn’t find why the file cannot be opened.
The same happens for
mt_prep_gamma_snap which you provided in your post.
Any hint would be helpful.
I don’t know why you get this error message, but it seems that your data structure is different from mine in geo floder, here is mine export data structure:
And maybe you should use absolute path in mt_prep_gamma_snap(I don’t know if it’s the reason). Meantime I get error under Cygwin but works fine in Linux, same case for use StaMPS in Matlab.
The two file post by Katherine, “mt_prep_gamma_snap” is different from “mt_prep_gamma”, and I use “mt_prep_gamma_snap”, it works for me(and I haven’t use “mt_prep_gamma”). But the file “ps_load_initial_gamma_snap” is same as “ps_load_initial_gamma” expect for a ‘;’, which has some problems in my work, so I have modified it.
Hope this helps