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
203 stars 71 forks source link

Use masking array based on coherence #363

Open adeane-ga opened 2 years ago

adeane-ga commented 2 years ago

Problem When masking occurs based on a user supplied coherence threshold, pixels below this threshold are masked in the prepifg step by converting them to NaNs.

Solution

Additional Notes NaNs (masking) occur for at least three reasons:

  1. Input data masking (from GAMMA no data value 0.0).
  2. Coherence masking.
  3. Phase closure masking.

Would it be best to have a combined masking array that contains NaN locations for all masking reasons, or keep them separate?

Currently PyRate should use only one of phase closure and coherence in the process due to the ordering of PyRate processes (coherence masking first will disrupt the phase closure algorithm). Perhaps the coherence masking step could be applied after phase closure step?

Thought needs to be put into when and where masking occurs.

mcgarth commented 2 years ago

If the intent here is to adopt the numpy masked array functionality, I just note that that will need a big effort.

A simpler refactor that would go a long way to addressing the stated problem would be to move the application of existing masking functionality form prepifg to the last step in correct (i.e. after all other corrections have been implemented)

adu461386118 commented 2 years ago

Agree, I think this is the current strategy for mosaic operation, one of the step before mosaicing is use the averaged coherence to mask the less reliable pixels, but that is applied individually after correctstep,