Plotting flexibility and support for GNSS component plotting#666
Plotting flexibility and support for GNSS component plotting#666sssangha wants to merge 6 commits intoinsarlab:mainfrom
Conversation
|
Thank you @sssangha for contributing (your data is beautiful!). All your 5 new features sound good to me in general. I have a few specific suggestions below that I hope you could address before considering merging the PR. Please do not let my strict review discourage you, view.py is one of the most used scripts, I just want to make sure it does not break.
These are a lot of changes in different scripts. With the current form, it's hard to track them and understand the reason behind the changes. Is it possible for you to break them down into independent PRs for each of the new features and add more comments? |
Pix_box was erroneously being passed as a tuple, leading to circleCI issues
Thanks @yunjunz! And yes, I agree. We need to be careful with commits especially to view.py. Honestly, I'm always a bit nervous when committing to this script in particular in mintpy, and 'extractProduct.py' in ARIA-tools! Anyways, I've integrated all of your suggestions and the tests seem to run fine locally, but it looks like I may need to sort out some circleci issues. I will confirm here once that all seems to be addressed. |
|
@yunjunz it looks like I sorted out the codacy and circleCI issues. Please let me know if you have any other questions/concerns. Thanks again |
|
@yunjunz I believe I have addressed all of your initial comments/concerns with my latest commits, so please let me know if any further action or review is required before we review. Thanks. |
|
Thank you @sssangha. I will check your PR again tonight. |
|
Hi @sssangha, I find it hard to see the flow of changes (and potential bugs), because the 1st feature requires complicated modifications (due to the complex script itself), while the rest 4 features are straightforward. Would you please consider separating this PR into two PRs: one for the extended bounds and one for the rest? |
|
@yunjunz sure, I will take care of this later Tuesday. Would it be possible to let me know though or help resolve potential conflicts if you plan on committing anything involved with the scripts in this PR, in case we both attempt commits today? Thanks |
|
🙌🏼 No planned commit from me. |
I was thinking about this, but the problem is that the relevant function generates a physical output file, which would lead to a great deal of overhead and inflexibility (e.g. imagine physical outputs for an entire TS stack and large DEM just for plotting purposes). The proposed function I've written is pretty short and would adjust data bounds on the fly for plotting, but I could add the function to this script for organization purposes. What do you think? |
|
I agree with you, the current form of sub-functions in
I like this idea. |
|
Hi @sssangha, sorry for the late following up. With the other functionalities merged, shall we rebase this PR (or issue a new PR if you prefer) for the expanded bounds in view.py? It will be great to have an example usage with a short explanation in the view.py#L45 as well. |
Description of proposed changes
I have added in a series of interrelated, dependent changes concerning plotting flexibility of user-defined bounds, and support for plotting of vertical and horizontal GNSS components.
Allow users to plot data in expanded bounds. Originally the code superseded user-specified bounds in such cases in favor of tight bounds about the track. This flexibility is crucial in my experience as it makes it much easier to compile and mosaic figures of large study areas involving multiple tracks.
Mask DEM background where it falls outside of InSAR coverage or is coincident with masked/nodata values.
Suppress plotting of GPS stations that fall outside of InSAR coverage or are coincident with masked/nodata values. Again, this flexibility is a welcome addition for compiling figures. Perhaps we can make this a user-specified option (i.e. by default plot empty symbols where there are no valid InSAR pixels), but leave alone my other commit whereby such stations are not passed into the output CSV.
Introduce support for plotting vertical or horizontal GPS components if the user is plotting vertical or horizontal InSAR velocity components, respectively.
Update list of supported units to also support American convention (e.g. inches, feet, miles).
Working example before code allowed for bounds expanded beyond the range of the input dataset, and masked out GNSS stations and DEM pixels coincident with nodata values:

After my introduced changes:
