Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unwrap with Phass and Snaphu using isce3 env #69

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

mgovorcin
Copy link

@mgovorcin mgovorcin commented Apr 12, 2022

This PR contains functions to prepare and run unwrapping with Phass and Snaphu version 2.0.4 as isce3.unwrap modules:

functions:
unwrap_phass :: unwrap wrapped interferogram in radians using Phass, added extra function vrt_cpx2rad which creates vrt file that extracts phase from complex format on-the-fly using gdal pixel function

unwrap_snaphu :: unwrap complex wrapped interferogram with Snaphu v2.0.4, with additional options as tiling, masking, defo_threshold etc.., added deformation_threshold to deal with snaphu infinite loop due to cost overflow when unwrapped result contains too many discontinuities (example: unwrapping Ridgcrest high-resolution coseismic interferograms with tiling option). Snaphu man page suggests either increasing the value of DEFOTHRESHFACTOR or decreasing the value of DEFOCONST

unw_vrt_xml :: creates vrt and xml files for unwrapping outputs similar to isceobj.createImage.renderHdr/renderVRT but without depending on isce2

This PR allows using isce3 modules for unwrapping with Phass and Snaphu algorithms.

Script unwrap_isce3.py contains functions:
1. unwrap_phass  - prepares and runs unwrapping with Phass, 
                                as Phass takes wrapped interferogram input in radians, function vrt_cpx2rad creates vrt file that extracts phase values on-the-fly using pixel function: phase

2. unwrap_snaphu - prepares and runs unwrapping with Snaphu version 2.0.4,  using tiling option useful             for unwrapping high-resolution interferograms. 

Added options related to tiling, such as number of tiles per row and column, number of processes, minimum region and etc.... and deformation_threshold option which I find useful when snaphu ends up in the infite loop due to a cost overflow (an unexpected increase in the total solution cost), examples Ridgecrest earthquake coseismic pairs. 
snaphu manpage suggests  increasing the value of DEFOTHRESHFACTOR or decreasing the value of DEFOCONST. Snaphu standalone version gives this warning but it appers Python bindings for snaphu, does not, they just end up in very long with segmentation fault at the end

3. unw_vrt_xml - function that creates .xml and .vrt files for output in the similar manner as isceobj.createImage() but without dependence on the isce2
left issues with xml.Elementtree unsolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant