plot_network: color-code network/matrix plot based on temp/perp baselines#693
plot_network: color-code network/matrix plot based on temp/perp baselines#693yunjunz merged 5 commits intoinsarlab:mainfrom
Conversation
yunjunz
left a comment
There was a problem hiding this comment.
Thank you @yuankailiu, the two features sound fine to me.
Here are my suggestions:
-
For the
plot_network.py, I tried to runplot_network.py inputs/ifgramStack.h5 --tband it does seem to work. Could you double-check, and add an example usage as well? -
For the
tsview.py, it's more complicated, as the script needs to support files in radar coordinates as well. Below is howview.pyhandles this, which eventually translated into theinps.map_proj_objvariable. I would recommend: packing this checking into a sub-function in view.py or utils/plot.py, and call it from tsview.py. If you want to go for this, please consider submitting it in another PR, as it requires much more changes.
Lines 310 to 345 in 92e00ad
a17b51c to
d0cd424
Compare
|
Hi Yunjun, thanks for reviewing this.
I have also changed the As for |
yunjunz
left a comment
There was a problem hiding this comment.
Thank you @yuankailiu for the updates. Could you check the few minor suggestions I listed above?
After that, the code is clean enough and I could work on the idea below (unless you are willing to work that, in that case let me know), which requires quite some refactoring:
Your implementation makes me think that we could use a more generic/flexible --dset dsName option: if dsName is a 3D matrix, then use maskFIle to calculate the spatial average (which is what currently do); if dsName is a 1D matrix, e.g. bperp, treat it as the calculated spatial average directly, and all the following code should be the same.
+ Can color the network lines with tbase (days) using --tbase option
+ Can color the network lines with pbase (days) using --pbase option
(use plot_network.py -h to see the explanations and an example)
utils1:
+ get_residual_std(): also return `std_file` variable
Description of proposed changes
Here are two proposed changes:
1). The displacement map in
tsview.pyneeds to be projected onto a specific Cartopy projection (e.g., ccrs.PlateCarree()) to properly overlay the coastline. This is added. But I am not sure whether there should be tunable projections. For small regions (for most of the cases), I think it is fine.2). In 'plot_network.py', Other than coherence, I personally think it would be good to also allow the lines (connecting acquisitions) to be colored based on their temporal or spatial baselines. This is just for network design displaying purposes. You can reject that as well.
Reminders