SliDEM-python icon indicating copy to clipboard operation
SliDEM-python copied to clipboard

Snaphu export fails for areas with NaN values (water, border pixels)

Open loreabad6 opened this issue 4 years ago • 10 comments

When doing the unwrapping, with a single tile, Snaphu fails with the following:

snaphu v1.4.2
27 parameters input from file snaphu.conf (84 lines total)
only one tile--disregarding multiprocessor option
only one tile--disregarding tile overlap values
Logging run-time parameters to file snaphu.log
Reading wrapped phase from file Phase_ifg_IW3_VV_25Aug2019_31Aug2019.snaphu.img
NaN or infinity found in input float data
Abort
done

Working on a subset inlands works good. cc @bro076

loreabad6 avatar Oct 21 '21 13:10 loreabad6

Things to try:

  • [ ] Mask out no elevation data
  • [ ] ?

loreabad6 avatar Oct 21 '21 13:10 loreabad6

After further checking, what seems to be the problem is the export step in the pipeline.

It creates weird artifacts on water areas that then result in errors during unwrapping: image

The errors are gone using Snaphu Export in SNAP-6, which I have installed locally. image

And then unwrapping works: image

I found this thread on the STEP forum that might be related, but I am not sure as if this is the case.

My problem is I cannot really test the Export in SNAP 8 Desktop since I don't have it locally. @bro076 I think you have SNAP-8 desktop, could you give it a try? I added a subset of the output of pipeline II here. @ZahraDabiri you have SNAP-7 right? Would you also mind testing?

Thank you both!

loreabad6 avatar Nov 02 '21 15:11 loreabad6

good stuff! Yes I have snap 8. I am going to another Oslo meeting for a few days now, but I will try it get it running tonight or tomorrow. Can snap 8 not be installed in the docker?

bro076 avatar Nov 02 '21 15:11 bro076

Yes but only command line for now. I am trying to determine if this is a bug from snappy, from SNAP-8 or from any other source... That's why I want to run the process on Snap-8 Desktop

loreabad6 avatar Nov 02 '21 15:11 loreabad6

Hi Lorena,

I did the export, unwrapping, import in the SNAP v7; the results look good Snaphu_import . I saved it on the R drive: "...\PFG330001_12_SliDEM\04_Work\WP3\DEM generation and Landslide volume estimaiton\test\Snphu" . "out_pipe_II_subset_Snaphu.dim" is the result of the import .

hope it helps :-)

ZahraDabiri avatar Nov 03 '21 15:11 ZahraDabiri

Thanks Ani! Yes looks good so SNAP 6 and 7 work ok... let's see if SNAP-8 Desktop gives issues

loreabad6 avatar Nov 03 '21 15:11 loreabad6

Looks great! Sorry I haven't had time today yet to check

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Lorena Abad Crespo @.> Sent: Wednesday, November 3, 2021 4:54:27 PM To: SliDEM-project/SliDEM-python @.> Cc: Benjamin Robson @.>; Mention @.> Subject: Re: [SliDEM-project/SliDEM-python] Snaphu export fails for subsets with water in SNAP 8 (Issue #9)

Thanks Ani! Yes looks good so SNAP 6 and 7 work ok... let's see if SNAP-8 Desktop gives issues

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/SliDEM-project/SliDEM-python/issues/9#issuecomment-959535038, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMTZPBK6LYJ4MICMHV4ZT7TUKFLLHANCNFSM5GOD24CA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

bro076 avatar Nov 03 '21 16:11 bro076

No worries! take your time :)

loreabad6 avatar Nov 03 '21 16:11 loreabad6

I ran it in python, and I get the result looks the same as when done in SNAP Desktop

image

bro076 avatar Nov 10 '21 14:11 bro076

Maybe related but there have been several failures also with the message:

Reading wrapped phase from file Phase_ifg_IW1_VV_19Jul2018_13Jul2018.snaphu.img
No weight file specified.  Assuming uniform weights
No brightness file specified.  Using interferogram magnitude as intensity
Reading correlation data from file coh_IW1_VV_19Jul2018_13Jul2018.snaphu.img
Calculating topography-mode cost parameters
Despeckling intensity image
Normalizing intensity
Intensity-normalization averaging box too large for input array size
Abort

Some checks indicate that coherence is 0 everywhere, any thoughts @ZahraDabiri?

loreabad6 avatar Aug 01 '22 14:08 loreabad6