-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Convert irradiance.liujordan to irradiance.campbell_norman #1104
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
Changes from 9 commits
fe486ec
afbd9e8
b2ba8a6
19569a2
5c9f95c
bd54e7e
cc40e6a
d2229fd
02e2676
999ecda
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,7 +13,8 @@ | |
|
|
||
| from pvlib import irradiance | ||
|
|
||
| from conftest import requires_ephem, requires_numba | ||
| from conftest import requires_ephem, requires_numba, fail_on_pvlib_version | ||
| from pvlib._deprecation import pvlibDeprecationWarning | ||
|
|
||
|
|
||
| # fixtures create realistic test input data | ||
|
|
@@ -285,13 +286,27 @@ def test_get_sky_diffuse_invalid(): | |
| model='invalid') | ||
|
|
||
|
|
||
| @fail_on_pvlib_version('0.9') | ||
| def test_liujordan(): | ||
| expected = pd.DataFrame(np.array( | ||
| [[863.859736967, 653.123094076, 220.65905025]]), | ||
| columns=['ghi', 'dni', 'dhi'], | ||
| index=[0]) | ||
| out = irradiance.liujordan( | ||
| pd.Series([10]), pd.Series([0.5]), pd.Series([1.1]), dni_extra=1400) | ||
| with pytest.warns(pvlibDeprecationWarning): | ||
| out = irradiance.liujordan( | ||
| pd.Series([10]), pd.Series([0.5]), pd.Series([1.1]), | ||
| dni_extra=1400) | ||
| assert_frame_equal(out, expected) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This test is going to emit a deprecation warning and we want to avoid that. We could delete it or we could skip the new
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I prefer the option after "or" |
||
|
|
||
|
|
||
| def test_campbell_norman(): | ||
| expected = pd.DataFrame(np.array( | ||
| [[863.859736967, 653.123094076, 220.65905025]]), | ||
| columns=['ghi', 'dni', 'dhi'], | ||
| index=[0]) | ||
| out = irradiance.campbell_norman( | ||
| pd.Series([10]), pd.Series([0.5]), pd.Series([109764.21013135818]), | ||
| dni_extra=1400) | ||
| assert_frame_equal(out, expected) | ||
|
|
||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.