Filter out low coherence pixels before phase unwrapping

Dear all,

I had been desperately struggling with this problem for several months until my dear colleague @constantinevi taught me how to do this. Therefore, I produce a detailed tutorial on this topic under his kind permission, and I hope it will be helpful for those in need.

Here is the link where I demonstrate the comparison of the results applied and not applied the coherence threshold.

Any insight and suggestions are welcome! Thanks a lot.

Yen Yi

10 Likes

Thank you for creating these instructions! I’m sure this is useful to many users.

1 Like

Thank you, Yen Yi.

I’m very happy to be a contributor of your tutorial and helping other users in this forum.
Also, if you encounter any other problems, I would always be happy to help you.

4 Likes

I am sure there could be a way to include this in the official repository of SNAP ESA tutorials. (http://step.esa.int/main/doc/tutorials/)

2 Likes

Yes, at the bottom of the page you can submit a tutorial. After review it might be included in the list of tutorials.

2 Likes

@tsum_yenyi
Just small remark - in the text describing BandMath expression you put NaN while on the
picture I see zero value (0). Since 0 is accepted value for the phase band I guess NaN is the correct value.

1 Like

@qglaude @marpet thank you for providing this information. After the discussion, @constantinevi and I decide to make a video and provide it to ESA.

@hriston_bg I think in both of my text descriptions as well as my figure, I expressed that we should replace the values under the threshold with zero. This is because we noticed that snaphu is unable to unwrap “NaN” pixels.

However, I also understand your point. To experiment, you can try to geocode the interferogram which has been filtered out low coherence pixels. You will find out that the pixels with zero value are turned into “NaN” in the geocoded product.

I suppose that although “zero” in the interferogram is an accepted value, it symbolizes no data value in a sense. I don’t know the actual mechanism so it is just my assumption. If anyone knows better than me, please feel free to correct me. I’d be very much appreciated. :slight_smile:

Lastly, I finished the post of my experiment on the comparison of different coherence thresholds applied. Please check this link if you are interested in my experiment.

Again, any insight and suggestions are welcome! Thanks a lot.

@tsum_yenyi Thank you for being kind to make this larger explanation. The second clarification and the results you provided are quite convincing. And just a suggestion - I guess a written tutorial shall be easier to follow than a video (this is just my own opinion).

Here comes a question to the SNAP development team with regard why the 0 values turn into NaN after geocoding. May be @marpet or @ABraun could help in this.

Regarding the second issue I’d be happy to read a paper or book chapter where the unwrapping with 0’s and NaN’s are discussed. I’m aware just about the basics of the unwrapping procedure, but in depth discussion might be better to read.

The NaN and zero issue I can’t explain. Honestly, I do not really understand what the issue is. :slight_smile:
Maybe @jun_lu or @lveci can? Or can you @ABraun?

Just a general remark in this direction.
If a value is marked as no-data, either by the bands no-data value (other call it fill value) or by an expression then those values are replaced by NaN when doing a reprojection.

@marpet I was just wondering if the unwrapping procedure could accept NaN’s and what the difference could make. You last remark answers my question - thank you.

@tsum_yenyi is talking about the 0 value in phase band will change to NaN after terrain correction. However, I think it is not really a issue as the phase equal to 0 always happen in the edge of the interferogram while the master and slave image are in different size. I guess the developers deal these pixel in 0 phase as NoData to avoid the error result (like phase in 0) at boundary of the raster result.

After turning the low coherence areas to zero in the interferogram, you have to make sure that the nodata option is disabled in the band properties. Otherwise it will be turned to nodata in the next processing step (here Terrain Correction). Probably also “Mask out areas without elevation” can be disabled to go sure.

Dear All,
Thank you all individually for taking time to try to solve our problems. With the help of STEP forum I managed to generate my dem in SNAP with Snetinel1 data pair. WÄ°th min temporal and maximum beam length. Although my area is in Indonesia and coverd with vegetation, I had no problem with unwrapping.
I followed mostly How to Create a DEM using Sentinel-1 Data | ASF tutorial and and this video for unwrapping DEM Generation using Sentinel-1 images in SNAP - YouTube .But my final dem is full of negative and wrong elevation values both in the dem generated from HV and other dem included during terrain correction.The places by the sea are very different as shown in the image in the following. When I checked teh same place in Google earth elevation on taht point is 2 meters whereas in here it is 62 meters in Elevation _HV band and -14 m in elevation band. I have not used any mask for low coherence area becasue everywhere is vegetation and this is where I want to get dem. I would be greatful if you could kindly reply to me…Kind Regards

How can we apply filtering a group of pixels inside the coherence map based on pre-determined coherence values, not on a single file, but on multiple coherence files from a series of interferometric pairs ?

There are probably unwrapping-errors that cause 2pi jumps in the phase. Can you share the coherence-image and histogram, the coherence is probably too low to allow for robust phase unwwrapping.

Dear Snap users
Attached are two unwrapping images from a filtred interferogram, one using a filter out low coherence pixels > 0.3. and the other without. As I read in the discussion the unwrapping of the masking area before unwrapping will not remain zero because the unwrapping adds the values of the phases adjacent to an absolute area.
My question is, How can I verify that my unwrapping is correct in this case? And how can I mask a low-coherence area and keep the phase equal to zero after unwrapping?