SNAPHU Import: "Header Could Not Be Read", Linux vs. Windows

I generated an interferogram from Sentinel-1 data after coregistering with ESD. After topographic phase removal, TOPSAR deburst, Goldstein filtering, and spatial subsetting, I performed a SNAPHU export and unwrapped using SNAPHU v1.4.2.

I attempted to import the results back into SNAP, selecting the spatially subsetted phase product and the header of the unwrapped product. SNAP produced a pop-up error indicating that the header could not be read, as in this post: Snaphu import problem

My files did not appear to be misnamed, as some examples in the previous thread were. At the start of interferometric processing, I specifically selected a single polarization option (VV).

As this is not the first time I’ve run into this issue, I decided to troubleshoot a little bit. The error appeared on a laptop running Linux Mint 19 and the most recent updates to SNAP 6.0. I have the same version of SNAP 6.0 on a Windows 7 laptop as well. I transferred the filtered phase product and the unwrapped product to the Win7 laptop vial USB drive, and retried the import. The product imported without issue. I transferred the resulting unwrapped product back to the Linux Mint laptop and proceeded to generate a terrain corrected displacement product.

While I understand that differences between operating systems can incur under-the-hood differences in complex software, two instances of the “same” software operating on the same input data should reasonably be expected to produce the same result. Does anybody have any insight into what could cause this discrepancy? I’m happy to provide whatever supporting data needed and repeat processing, time permitting (these are my home computers, and I can’t access them from work).

1 Like

i’m facing this problem too. could you solve it?

I did eventually figure out the issue.

During phase unwrapping, SNAPHU 1.4.2 creates an additional garbage file in the same directory as the unwrapped .img and .hdr files. The filename of this extra file frequently contains characters that are not correctly parsed by the OS, or by the file selection dialog in the SNAPHU import tool in SNAP. Even if you select the correct file in the dialog, the tool will trip over the unintelligible characters in the other file’s name within the same directory, leading to the “header could not be read” error.

The remedy is very simple: delete the garbage file with the unintelligible name. Once that is out of the directory, SNAPHU import proceeds just fine.

I don’t think I’ve seen this issue with SNAPHU v2.0.4, but it’s been a little while since I checked.

Hope this helps. Best wishes!

1 Like

thank you for reporting. I was not aware that these temporary files could cause the error…

1 Like