-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Handle different time intervals in clearsky.detect_clearsky #507
Comments
Wouldn't it be relatively straightforward to accept uniform intervals of any length by multiplying the supplied coefficients by a scaling factor? I'm guessing that the non-uniform case should be implemented in a separate function that's called within |
I guess we never finished the discussion in #433, where I cited this function as an example where a warning might be useful. Or perhaps more accurately, I never acted on the implementation suggestion! If the model was developed, tested and published for and with 1-minute data, then modifying it for other sampling rates should get additional validation. |
@wholmgren up to a point, yes, but the threshold criteria should be re-considered if one is applying this method to data at much longer intervals. @adriesse good point. The paper looked only at 1 minute data. I've used versions of that algorithm on roughly one minute data (30s to 90s, not uniform intervals) and got reasonable results. At 15 minute intervals or longer I'd question the outcome. I'd be OK with a gentle warning about validation of the algorithm. I'd be more than OK if someone wants to actually validate the algorithm, or show how it should change, to handle longer time intervals. |
I think it's alright to allow intervals other than 1 minute provided that the data points fit within the span of a single day (1440 minutes). Unevenly spaced data might be a major issue for the entire algorithm because of the static window size. |
I suggest we plan to treat two issues/enhancements separately:
Item 1 is relatively straight forward to address, and I think @bhellis725 has already addressed it here: https://github.com/bhellis725/pvlib-python/tree/clearsky Hopefully we'll see a pull request on that soon. Item 2 would be a great addition, but is a heavier lift, so I'd be in favor of at least advancing item 1 in the near term. |
I just submitted a pull request that addresses some of these concerns and the concerns in #506 (I made both fixes simultaneously, so they're in the same PR). In #506, there is mention of modifying the test for the |
Is your feature request related to a problem? Please describe.
clearsky.detect_clearsky
implicitly assumes data at 1 minute time intervals. See #505Describe the solution you'd like
clearsky.detect_clearsky
should be capable of accepting data at different, and possibly non-uniform, time intervals. PVLib MATLAB functionpvl_detect_clear_times
provides an example method.The text was updated successfully, but these errors were encountered: