GeoscienceAustralia / PyRate

A Python tool for estimating velocity and time-series from Interferometric Synthetic Aperture Radar (InSAR) data.
https://geoscienceaustralia.github.io/PyRate/
Apache License 2.0
200 stars 70 forks source link

Nans for pixels in reference window in linear_rate product #310

Closed mcgarth closed 3 years ago

mcgarth commented 3 years ago

Observation: Nans for pixels within reference window in linear_rate product

Possible cause: are pixels with zero value set to Nan following the APS spatial filter operation?

Solution: during ref phase subtraction, assign ref phase to a sub-millimetric number (e.g. 0.00001) instead of zero.

chandra2ga commented 3 years ago

This is an important issue and a bug in the program while processing pyrate with higher multi-look factor.

Concern: When we used user selected reference pixel in case of higher multi-look factor e.g., 20 mlk. Some cases we encountered that after APS filtering step the program assign default NaN values to the reference pixel location (when not finding any neighboring ref pixel within a certain search window size) but then continue processing without showing any error.

Here is an example of using 20 mlk vs 15 mlk. If we zoom around the reference pixel location we will notice the actual differences and NaN pixel value assigned for 20 mlk velocity map. zoomed_vel_map

Solution: Whenever program encountered such issue, program would automatically assign a non-zero small number of higher decimal (e.g., 0.000001) to the reference location.

@basaks may use develop branch for bug fix. Let me know if you have any further concern. Thanks!

richardt94 commented 3 years ago

I'm not sure if I agree with NaN-setting zero pixels after the APS if this is what is happening - surely we can create a mask from pixels that are NaN before the APS, do the APS (including interpolating the NaNs for compatibility with Fourier transform), and then use the mask to set no-data areas on the output? This seems more robust to avoid erroneously masking areas of the interferogram that happen to be close to zero.

mcgarth commented 3 years ago

The immediate issue has been addressed with #335