-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Linke turbidity factor fixes #264
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
* set minimum index as 0 not 1 * adjust _linearly_scale so that is increments are 5 minutes or 1/12 of an arcdegree from the centers of neighboring indices * this fixes the out of bounds error for latitudes or longitudes at the limits of the range * move _linearly_scale to be right after lookup_linke_turbidity * add link to pdf on AOD and LT from MeteoTest * raise IndexError if outputmatrix is more than half an index outside of the limits Signed-off-by: Mark Mikofski <[email protected]>
Signed-off-by: Mark Mikofski <[email protected]>
Thanks for digging into this! I'm a bit skeptical that the new log messages are going to be useful to anyone after this is merged. I've been slowly removing all of the silly logging that I added before I was using pdb. You can get rid of that todo comment, as far as I'm concerned. I think users have a responsibility to follow our conventions. The tests that throw IndexErrors should use pytest as shown here: http://doc.pytest.org/en/latest/assert.html#assertions-about-expected-exceptions |
Signed-off-by: Mark Mikofski <[email protected]>
@wholmgren do you want me to revise the 3 failing tests with new expected values?
|
Reverse engineering the current expected LT values to make sure the new calculation is consistent:
|
Signed-off-by: Mark Mikofski <[email protected]>
Can you look into doing the same thing for the rest of the tests? I'm guessing that it will work for some but not others. Maybe can adjust the precision of the tests too. |
Can you tell me which tests aren't passing? All |
* use calendar month days instead of approximation of monthly middles * also account for leap years * if all years are leap years, or not any are leap years, use fast interp, otherwise loop and interpolate each timestamp * add _leapyear tests and update expected values for new interpolated Linke turbidity factors Signed-off-by: Mark Mikofski <[email protected]>
There is a failing test in https://travis-ci.org/pvlib/pvlib-python/jobs/176473332 Other than copy/pasting a bunch of new values, the easiest way to fix the modelchain tests might be to manually supply the irradiance data in the |
Signed-off-by: Mark Mikofski <[email protected]>
Signed-off-by: Mark Mikofski <[email protected]>
There is an error in
|
Awesome, thanks! Two minor things left to do:
The test_forecast error is unrelated (sorry). |
Signed-off-by: Mark Mikofski <[email protected]>
Thanks @mikofski! |
fixes #263 and fixes #262
outputmin
to zero, since (1) zero based indexing, and (2) documentation states that indices of LT data are 0.0833[arcdeg] apartIndexError
for out of bound lat/lontest_linke_turbidity_corners()
to test corners are not out of bounds, PASSES, but older tests fail since increment is different.