-
Notifications
You must be signed in to change notification settings - Fork 1.1k
bugfix for high frequency time series in scaling.py, regarding issue … #1258
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
Conversation
I'm going to push an additional commit proposing a slight refactor to scaling.wvm. I have a use case for having a separate computation of the variability reduction factors used by the WVM. In a recent conference paper I was looking at how to apply the WVM in reverse to increase the spatial resolution. While I'm not proposing we include that reverse case (until such time as someone is able to generate more comprehensive published results for it), having a computation of the VR available would make it possible to do that calculation on your own with minimal re-writing of WVM code to perform those calculations. It has no impact on the existing WVM calculation, but I did write a test for the proposed new function. If putting this change here is inappropriate, or this is an unwanted change, we can just unwind this commit and stick with the bugfix above. |
The refactor makes the main function more readable, IMO. I'd keep it and if it supports future capability, all the better. |
Sounds good, I will fix the stickler errors and squash the commits then. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jranalli can you remove the extra line in the whatsnew file?
stickler issues Refactor to separate out VR computation within pvlib.scaling.wvm to a new function pvlib.scaling._compute_vr. bugfix for high frequency time series in scaling.py, regarding issue 1257 add pull request number bugfix for high frequency time series in scaling.py, regarding issue 1257
5dea6ae
to
300128e
Compare
Sorry about that, I think I got it. |
@cwhanse can you merge if this is ready? |
thanks @jranalli |
No problem, thanks for including it! |
…1257
docs/sphinx/source/api.rst
for API changes.docs/sphinx/source/whatsnew
for all changes. Includes link to the GitHub Issue with:issue:`num`
or this Pull Request with:pull:`num`
. Includes contributor name and/or GitHub username (link with:ghuser:`user`
).When passing pvlib.scaling._compute_wavelet a pandas timeseries with a time resolution faster than 1s, the use of .seconds to calculate the time series delta_t produced an overflow error. It occurs because .seconds only computes integer values of seconds. I added a computation including microseconds to account for fractional seconds in this case.