isce-framework / fringe

Fine Resolution InSAR With Generalized Eigenvectors (FRInGE)
Apache License 2.0
80 stars 42 forks source link

EVD: Invalid values (-4 and -2) in tcorr.bin #5

Closed forrestfwilliams closed 4 years ago

forrestfwilliams commented 4 years ago

While processing outputs of the ISCE stackSentinel workflow, the temporal coherence binary file created by EVD.py includes two invalid integer values (-4 and -2). While these invalid values appear to be randomly distributed, many do occur in the same locations as persistent scatterers.

hfattahi commented 4 years ago

I'm not sure what is the issue exactly as you haven't asked a question. But your observation is correct. The Eigen Value Decomposition is performed only on Distributed Scatterers. Pixels with self similar neighbors less than a threshold (e.g., 5) are not chosen for further processing. The PS pixels are normally among those pixels which are not chosen for EVD analysis. Later in the proposed workflow (in integratePS.py ) , the PS pixels and their phase series are added back and their temporal coherece is adjusted. So the behavior is expected and correct.

piyushrpt commented 4 years ago

In general, workflows use a threshold of corr < positive_threshold like 0.4. Negative values are masked out by this as @hfattahi described above when combining with PS. These flags of -1 to -7 are simple checks to indicate which of the matrix factorization / inversion operations was numerically ill-conditioned in the MLE inversion. See https://github.com/isce-framework/fringe/blob/a21bbfec9ba4ba007d19a888c8fafa83d6e1890c/src/evd/evd.cpp#L632

for example.

forrestfwilliams commented 4 years ago

Thank you for explaining this to me, I apologize that I was not clearer in my first message. My issue was that I did not understand what these values signified, and I assumed that they were erroneous. I was experiencing issues with unwrapping via SNAPHU (date.unw contains a layer of zeroes/ones and a layer of zeroes) and I thought that these negative values were the source of my problem.

piyushrpt commented 4 years ago

Snaphu should clip negative values to 0.0 - https://github.com/isce-framework/isce2/blob/4cc13950a83a3c7d93643483b88c1439d6f3a9d6/contrib/Snaphu/src/snaphu_cost.c#L1178-L1183 . If this is resolved should we go ahead and close the issue?

forrestfwilliams commented 4 years ago

Yes go ahead and close it. Thank you.