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

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
Katherine

Good luck!

ps_load_initial_gamma_snap.m (5.46 KB)

mt_prep_gamma_snap (6.42 KB)

36 Likes