Open SteffanDavies opened 9 months ago
The next line in the code also masks them using the SNAPHU mask, effectively excluding NaN pixels from unwrapping. This is a feature not present in GMTSAR processing. Additionally, like GMTSAR, we can use nearest-neighbor interpolation on the interferogram stack to fill NaN values:
sbas.interpolate_nearest(intf.where(...))
So is it preferred to use interpolation or 0 filling? How does it affect the results and speed?
Masked values in the unwrapped phase lead to disconnected regions. Interpolation helps in connecting these regions for cases without phase jumps. In areas with high coherence, both masking and interpolation yield similar results. However, in low-coherence areas, the outcomes are unpredictable, and it's necessary to experiment to determine which method is more effective.
I was wondering because I am processing an area divided by a river. So maybe interpolation makes sense.
Interpolation seems to be a lot faster.
Interpolation works effectively when there are no significant phase jumps for the interpolated pixels. If your river area doesn't encompass vastly different topographies, interpolation should be a viable approach. Additionally, SNAPHU processes zero-gradient interpolated pixels quickly, as these do not necessitate complex change computations.
https://github.com/mobigroup/gmtsar/blob/b23580b9b6138752cc88bc5a63837c5197b1f036/pygmtsar/pygmtsar/Stack_unwrap_snaphu.py#L79
I can't seem to find any reference to interpolate_nearest in the code. Just filling nan with 0.