SliDEM-project / SliDEM-python

Python package for the SliDEM project
https://hub.docker.com/repository/docker/loreabad6/slidem
Apache License 2.0
17 stars 2 forks source link

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

Open loreabad6 opened 2 years ago

loreabad6 commented 2 years ago

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 commented 2 years ago

Things to try:

loreabad6 commented 2 years ago

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!

bro076 commented 2 years ago

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?

loreabad6 commented 2 years ago

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

ZahraDabiri commented 2 years ago

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 :-)

loreabad6 commented 2 years ago

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

bro076 commented 2 years ago

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.

loreabad6 commented 2 years ago

No worries! take your time :)

bro076 commented 2 years ago

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

image

loreabad6 commented 2 years ago

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?