Skip to content
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

Fix variogram sill bug in statsPlot, updated handling of units #118

Merged
merged 1 commit into from
Aug 24, 2020

Conversation

sssangha
Copy link
Collaborator

Description

Fixed bug in sill value. Specifically, a vestige in the code applied a factor of 1e-4 to the output sill value irregardless of the true units of the input file. Furthermore, input units were assumed to be in units of meters, even though they are downloaded from UNR in units of mm.

Thus, a new filenaming convention has been implemented. Specifically, downloadGNSSdelays.py and getStationDelays.py have been updated such that the final output filename reflects the source repository (e.g. UNRcombinedGPS_ztd.csv). The source repository is toggled with the —gpsrepo option, where currently only UNR is supported. Accordingly, statsPlot.py has been updated to recognize the source repository based off of the filename and thus handle the native units properly. Given this, the user no longer has to manually specify the native dataset units with the —unit. The —unit option has thus been modified to now serve as a means to specify the output unit for plotting purposes (by default ‘m’).

Also fixed bug in statsPlot.py such that grids with more than 1000 samples are subsampled by 1000 randomly selected samples. This wasn’t successfully implemented before as the number of samples (integer) was compared with a threshold value which was defined as a float, such that this condition was ignored and large arrays were passed along without being subsampled. This threshold of 1000 samples is hardcoded, but can easily make into an option that a user can have more direct control over.

Will update the notebooks accordingly to reflect these updates.

Motivation and Context

Addresses #11

How Has This Been Tested?

To replicate small test, run the following download/plotting commands:

raiderDownloadGNSS.py --out products --years '2018' --returntime '00:00:00' --bounding_box '36 40 -124 -119'

raiderStats.py --file products/UNRcombinedGPS_ztd.csv -w maps_sill -b '36 40 -124 -119' --seasonalinterval '03-21 06-21' --plotall --cpus all

Type of change

  • [X ] Bug fix (non-breaking change which fixes an issue)
  • [X ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • [ X] I have added an explanation of what your changes do and why you'd like us to include them.
  • I have written new tests for your core changes, as applicable.
  • I have successfully ran tests with your changes locally.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@dbekaert dbekaert self-requested a review August 24, 2020 16:24
Copy link
Owner

@dbekaert dbekaert left a comment

Choose a reason for hiding this comment

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

per offline discussion

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.

2 participants