SNAPHU parameters

Hello everyone,

Anybody who can explain the SNAPHU parameters to me and maybe somebody has some experience how they affect the results?

-Number of tiles (do more tiles decrease the accuracy of the deformation results?). My supervisor told me I should try to unwrap the whole interferogram as one but this seems to be impossible.
-row overlap/ column overlap- when should they be more than 0?
-tile cost threshold? (I do not understand what this means at all?)

Does anybody know which parameters to use in order to to unwrap it relatively quickly and still have good accuracy?

1 Like

To unwrap interferograms on a desktop or laptop with Snaphu, you want to keep the width of the tiles less than about 3000 pixels or you will run out of memory. You can unwrap the whole interferogram as one if it is narrower than that.

More tiles increases the chances of mismatch between tiles.

The tile overlap should be around 200 pixels. I don’t know why the default in SNAP is 0. Snaphu needs some overlap to match the phase between tiles.

I don’t know what the tile cost threshold is.

5 Likes

I’ll update the defaults. Thanks

1 Like

I see snaphu 2.0 is available:
https://web.stanford.edu/group/radar/softwareandlinks/sw/snaphu/

“The -S command: Do single-tile re-optimization after tile-mode initialization.
If this option is specified, snaphu will run in tile mode to
generate an unwrapped solution, which is then used as the ini-
tialization to a single-tile optimization that produces the
final unwrapped output.”

I’m waiting for Windows 64 binaries.

1 Like

Exciting that Snaphu v2.0.0 has been worked on and is being added to Ubuntu 19.10) package lists.
Curious if the -S option can improve solutions in some cases…
Snaphu gives a warning about not enough tile overlap if 200 is used, 400 seems to work.
It is now able to export a connected component file even in tile mode. This is useful for time series packages like MintPy - However, I am not sure how to read this file yet, does anyone know how to read the connected component output (from the -g option) into SNAP?

The Snaphu connected components file is a 1-byte image with the same number of pixels as the interferogram. I am not sure how to read it into SNAP.

I found a workaround using the same reader as Snaphu import.

  • Rename the connected component file with extension .img
  • Copy the unrapped header file that Snaphu export creates to be the header for the connected component file (same name but with .hdr ext).
  • Edit the header file and change data type from 4 (int32) to 1 (unint8).
  • Read using Snaphu import (needs the interferogram again)
  • The connected component band will be named Unw_Phase_ifg_*
2 Likes

Hello!

I am using snaphu graphical user interface (I don’t know how to use snaphu command based interface).

I am trying to unwrap all the sub swaths (IW1-IW3) at once but am unable to do so. I get the message that says process completed in about 61,000 seconds, but there is no .img file generated, so the process is not complete. Sometimes I also get ‘Out of Memory’ error. I saw this answer about decreasing the width of tiles but I don’t understand how to change the width of pixels in snaphu export step. Can you please elaborate? (Photo of snaphu GUI is attached)

Thank you for help!

snaphu%20GUI

If you are getting ‘out of memory’ errors, then that means the interferogram you are trying to unwrap is too large. One way to do the unwrapping of a large image is to use the tile option in SNAPHU, but you need to change the parameters to include some overlap between the rows and columns. The GUI image that you show will use 10 rows and 10 columns of tiles. I would recommend the row overlap and column overlap each be at least 100. Generally, you will also get better results from the “SMOOTH” mode instead of “DEFO” mode.

3 Likes

Hi!

Thank you for helping me! I did as you instructed, but I am having some problem with unwrapped images (Screenshot attached). All images are generated using same dates. I played with snaphu export parametrs and top right of the image is always bad. I can see the pixels, which was not supposed to happen. Plus I am getting slightly different results. Can you please tell me which image is better among 3? Also, I can ignore the top right portion, since it is not my AOI. Is it ok to ignore that?

Thank you once again!

Hi, you are welcome. The top right of your image area on the Big Island of Hawaii is dense rain forest. The C-band Sentinel-1 data has very low coherence there, even over short time intervals, so the phase unwrapping will almost always have errors there. You should ignore that part. The southern circle over Kilauea has mostly bare rock due to the active lava flows, so the coherence is much higher and there it is more likely you will get good unwrapping results. It is always a good idea to look at the coherence map before interpreting the phase unwrapping.

3 Likes

Do you pass it like a “mintpy.load.unwFile” into the smallbaseline.cfg? For example, mintpy.load.connCompFile = /home/work/_/_tc.data/Unw*.img. And how is about applying the “Terrain Correction” and “Subset” steps on it?

Just install Ubuntu 18.04 from Microsoft Store and then SNAPHU 2.0.3 into it. All Windows 10 directories will be visible from Ubuntu. You can preprocessing all essential “intf” files for SNAPHU within SNAP and then unwrapp them by SNAPHU.