Skip to content

Add plotting script for correction files #345

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 9, 2021

Conversation

adeane-ga
Copy link
Contributor

@adeane-ga adeane-ga commented Jul 5, 2021

This script is designed to plot the correction files (NumPy), against the original interferogram and the corrected interferogram (GeoTIFFs) to aid user's interpretation of corrections and help debugging with PyRate.

Here is an example where from left to right is original IFG (interferogram_dir/), correction applied (orbit_error_dir/), and resulting corrected IFG (temp_mlooked_dir/):

image

Help Output

image

Example Usage:

python3 ~/PyRate/utils/plot_correction_files.py ./interferogram_dir ./orbit_error_dir ./temp_mlooked_dir ./plot_save_dir 1 10

the last two arguments will indicate that it will plot from the 1st to the 10th IFG (10 separate PNGs), this can be changed to any range within the maximum number of IFGs in user PyRate directory. Using 1 1 will plot the 1st only

Notes

  • This script is designed to be generic and as simple as possible, so it is easy for any given user to change it on the fly in there own local repository (rather than a script that deals with every possible combination of processing).
  • The script is also naïve, in that it relies on the user to decide how valid the comparison is, depending on user's own processing (which corrections were applied etc.).
  • I have only tested this script on the Orbit and APS corrections, it theoretically should work on the DEM error correction too but I have not tested it.
  • Currently, the files we save out as APS "correction" files, don't seem to contain the full correction, work will be done to investigate this.
  • Users can plot a single IFG or the full time series based on the last two arguments (but users need to have awareness of how many IFGs are in their directory).
  • If plotting full time series, consider running as a QSUB job (if on NCI), otherwise plotting subsets will not take up too much memory.

@adeane-ga adeane-ga requested review from mcgarth and richardt94 July 5, 2021 01:49
Copy link
Contributor

@richardt94 richardt94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Al, this is good functionality to have for debugging our outputs. I have a couple of comments on ways this could be improved - I'm approving the PR, so they're not mandatory, but please consider them before merging.

Copy link
Contributor

@mcgarth mcgarth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Al, great contribution and exceptionally documented!

Before merging, please just check that al the script's package dependencies are in the requirements-plot.txt

@adeane-ga adeane-ga merged commit a28f8bb into develop Jul 9, 2021
@mcgarth mcgarth deleted the AD/util_plot_corrections branch July 9, 2021 01:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants