Snaphu unwrapping error - tile issue?


I’m relatively new to the InSAR world and SNAP. I’ve been trying to use snaphu via the MacOS terminal to unwrap interferograms created using S1 SLC imagery. To start (and to keep file sizes down), I’ve used one swath (IW1) and two bursts from a trial image pair.

I believe that snaphu has been configured properly on my machine.

I’ve used snaphu export with the following settings:

  • Col and row overlap: 0
  • Number of processors: 4
  • Number of tiles cols: 10
  • Number of tiles rows: 10
  • Cost mode: DEFO
  • Initialisation method: MCF (although have also tried changing this to MST)
  • Cost threshold: 500

When I copy the command prompt from the created snaphu.conf file and try to run, the process appears to start, but then aborts (see below):

The tile logs (e.g., tmptilelog_0_1) for the processing notes an inability to write to a file, causing the abortion of the process:

After searching the Step Forum and resulting advice for similar issues, I tried adding the full file paths for all files within the snaphu.conf file. This didn’t make any difference to the resulting error.

Thinking that this may be a tile issue, I played around with changing the number of tiles and overlap. The unwrapping is only successful if I use one tile only. For such a small image (i.e., two bursts of one swath) this doesn’t take very long to run. However, I’ll need to upscale the analysis which will require increasing the number of tiles used for unwrapping.

Has anyone come across this unwrapping situation / error before? Or have any insight into why the unwrapping works using one tile, but not when using an increased number of tiles?


I would have suggested to change the number of tiles, but if only 1x1 tile works, this is not a solution.
Does the interferogram look alright?

Hi Andreas,

Thanks for your reply. I think the interferogram looks okay:

This includes applying mulitlooking and phase filtering.

more than okay, I would say :+1:

Cannot think of a reason why such data leads to an error. MST and MCS produce the same problem?

The only thing I can then suggest is to test if SMOOTH runs differently than TOPO or DEFO.

Since snaphu version 2 there is an option to exclude low coherence areas or to mask out certain areas, but I see no reason why this is necessary in your case, nor does it simplify the workflow for multiply products.

I’ve just doubled checked that MST and MCF produce the same resulting error messages (i.e., abnormal exit in terminal and log file showing inability to write to tmp file).

Using SMOOTH or TOPO also result in the same error as using DEFO. I’ve tried SMOOTH and TOPO in varying combinations with MCF and MST, but have left the other export parameters defaults (as in original post above).

I’m looking at an area in the highlands of Scotland, which is mostly vegetated hills and peatlands. The coherence is likely to be low in the vegetated areas. Although my image pair is only 13 days apart, so I wouldn’t expect any dramatic changes in land cover / movement.

maybe it is worth downloading snaphu 2.0.4:

For windows, the exe files have to be compiled first using cygwin, but that’s not so complicated. Let me know if you want to give it a try and I’ll send you a document with instructions.

I’m currently using v1.4.2 for linux. I’d be willing to try the newer version - will download now and crack on.

If using Mac, will the exe files still need to be compiled using cygwin?

Downloading and installing snaphu 2.0.4 has worked! I can now use the default 10 x 10 tiles (or any other configuration I opt for).

Thank you so much for your help. :slightly_smiling_face:

great, happy to hear that this solved the issue!
Raises hopes that this error will be gone in the future (was reported quite frequently, but I never understood its actual cause).

1 Like

Would you please give any instructions or tutorials on how to run snaphu 2.0.4 on windows?

Hello ABraun,
You mean -M option for masking?
Would you please tell me how I can generate the appropriate “byte mask” for that option?

Thanks in advance.

I have never tried it myself, sorry. But I’m interested in case you fiund out :slight_smile:

I’ll share when I solve it. :nerd_face:

I had this warning during the unwrapping then I had an error “A java.nio.file.InvalidPathException exception has occurred” while selecting the .hdr file while importing.

What could be causing this warning? I have selected 200 Row Overlap and 200 Column Overlap during snaphu export


how large is your raster in total (colums/rows)?

I don’t think the warning is related to the Java Exception error. Has the unwrapping finished completely and produced a img file?

I am sorry I don’t know how to check the raster’s (column/rows), well, if the s1tbx products are readable by other software, I can check but it’s not possible.

this is the error I had, I have re-installed Snap and still getting the error.

I also selected the UnwPhase_ifg…hdr file for 2-Read-Unwrappes-phase tab and I don’t know why that error mentioned the coh_…hdr.

the number of rows is the number at the end of the snaphu command. But the first screenshot indicates that the unwrapping is completed (two UnwPhase_ifg files).

The error message indicates that there is something wrong with your path. Is the data located on a network drive?

Please try to move the exported folder to a simple path (C:\temp\ for example) and try to import the unwrapped phase again.

1 Like

Mr. Andreas you are great, I have created a simpler path and the import was accomplished successfully, Although I made several imports through very long paths in the hard drive and never had this problem, perhaps there’s unwanted " " space in the path address I couldn’t see. but thanks again

very good.