AlexeyPechnikov / YamchiDam

Yamchi Dam, Ardabil, North Iran
MIT License
8 stars 1 forks source link

PSI code #1

Closed firmanhadi closed 1 year ago

firmanhadi commented 2 years ago

Dear Alexey,

Thank you very much for creating PyGMTSAR. It helps a lot. I have successfully produced the result using two examples from your tutorial, with MacOS (Apple Silicon). I have a question regarding the YamchiDam example. Which part of the code implements PSI? As I understand, the parts of implementing SBAS are written with the word sbas.

Best regards,

Firman.

AlexeyPechnikov commented 2 years ago

For Sentinel-1 interferometry usually we combine SBAS (small baseline) and PSI (persistent scatters) techniques. Actually, baseline is always small for Sentinel-1 satellites due to precision orbits of the satellites and SBAS series are easy to process. Persistent scatters can be easily detected using some threshold for average coherence grid like to:

# build stack of correlation grids for all the interferometry pairs
corrs = sbas.open_grids(pairs, 'corr')
# filter low-coherence pixels for all the grids
corr_ps = corrs.where(corrs.mean('pair')>=0.6)

Here corr_ps is the grid which includes all the persistent scatters with the defined threshold (0.6). At the same time the persistent scatters with a high threshold or on low corehence areas are too sparse. To resolve the issue we use nearest interpolation as

# build stack of unwrapped phase grids for all the interferometry pairs
unwraps = sbas.open_grids(pairs, 'unwrap')
# filter low-coherence pixels for all the grids and fill the gaps by the nearest valid pixel values
unwraps_ps_filled = sbas.nearest_grid(unwraps.where(corr_ps>0))

to produce unwrapped phase interpolated grids without NODATA gaps for SBAS processing using sbas.sbas_parallel() function. Also, we are able to apply the same approach to SBAS results instead while there is some difference (unwrapped phase interpolation allows to use the corresponding coherence values).

And to exclude low-coherence pixels defined for the every grid independently use this code:

# build stack of correlation grids for all the interferometry pairs
corrs = sbas.open_grids(pairs, 'corr')
# filter low-coherence pixels for all the grids
corr_ps = corrs.where(corrs>=0.6)
firmanhadi commented 2 years ago

Dear Alexey,

Thank you very much for your clear explanation. I am teaching Radargrammetry for Geodesy Engineering students at Diponegoro University, Indonesia. Usually, I use LicSBAS for SBAS, as it's easier to implement, but I hesitated to use GMT5SAR. Now, I will also use PyGMTSAR.

Thanks again.

Regards,

Firman.

AlexeyPechnikov commented 2 years ago

Glad to hear that! I've committed a lot of changes today and the example notebooks will be updated soon too. The changes related to process SBAS series of ~1000 interferograms without hassle even on Apple Air laptop.

AlexeyPechnikov commented 2 years ago

The example updated, use the new link to open it on Google Colab: GMTSAR example dataset S1A_Stack_CPGF_T173

firmanhadi commented 1 year ago

The example updated, use the new link to open it on Google Colab: GMTSAR example dataset S1A_Stack_CPGF_T173

Thank you very much.