8000 [DRAFT] Allow arbitrary IAM function in pvlib.iam.marion_diffuse by markcampanelli · Pull Request #2050 · pvlib/pvlib-python · GitHub
[go: up one dir, main page]

Skip to content

[DRAFT] Allow arbitrary IAM function in pvlib.iam.marion_diffuse #2050

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

Draft
wants to merge 36 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
2a50a63
Add iam_pchip function and callable model for marion_diffuse
markcampanelli May 12, 2024
398a8ff
Tidy up
markcampanelli May 12, 2024
ed79db8
Appease flake8
markcampanelli May 12, 2024
d596e28
Pin flake8 to match github workflow
markcampanelli May 12, 2024
3e3f0d6
Tidy up more
markcampanelli May 12, 2024
f63a018
Improve test
markcampanelli May 12, 2024
bc519be
Only use pchip in tests
markcampanelli May 15, 2024
d97d077
flake8 ftw
markcampanelli May 15, 2024
c4c18d7
flake8 more ftw
markcampanelli May 15, 2024
8727b04
Remove unused lines in test
markcampanelli May 15, 2024
e726eed
Merge branch 'markcampanelli/main' into marion_diffuse_dep_inj
markcampanelli Jun 30, 2024
6322523
Update builtin models and models' parameters maps
markcampanelli Jun 30, 2024
fe7833b
Appease flake8
markcampanelli Jun 30, 2024
5d218d5
Appease flake8 more
markcampanelli Jun 30, 2024
bcc8429
Undo function moves
markcampanelli Jun 30, 2024
deb466e
Revert to better exception message
markcampanelli Jun 30, 2024
05319f3
Make iam_model required for ModelChain
markcampanelli Jul 1, 2024
dd8408f
Restore infer_aoi_model
markcampanelli Jul 1, 2024
1bd8f0d
Revert additional changes
markcampanelli Jul 1, 2024
0aff7c7
Address failing test and minimize diff
markcampanelli Jul 1, 2024
567374f
Get ModelChain codecov
markcampanelli Jul 1, 2024
e41621a
Add/improve test coverage
markcampanelli Jul 1, 2024
6a0d14d
Add docstring and cover bad model name
markcampanelli Jul 1, 2024
a580ec6
Appease flake8
markcampanelli Jul 1, 2024
2bb3fb6
Cover required params check
markcampanelli Jul 1, 2024
b6fe2bf
Minimize unrelated diff
markcampanelli Jul 1, 2024
2c0d11b
Test get_builtin_models
markcampanelli Jul 1, 2024
083c3c9
Improve comment
markcampanelli Jul 1, 2024
ce7577c
Remove spurious function
markcampanelli Jul 1, 2024
d49ee79
Merge branch 'main' into marion_diffuse_dep_inj
markcampanelli Dec 21, 2024
a037bae
Update modelchain docstrings
markcampanelli Dec 21, 2024
ec3790b
Make sapm iam function use common interface
markcampanelli Dec 21, 2024
0b4a91d
Appease flake8
markcampanelli Dec 21, 2024
c64e6b9
Harmonize IAM and spectral correction and update IAM inference
markcampanelli Dec 22, 2024
08ae199
Appease the linter
markcampanelli Dec 22, 2024
6e8421c
Fix spectral correction example
markcampanelli Dec 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Improve test
  • Loading branch information
markcampanelli committed May 12, 2024
commit f63a018129351c9ce9dad723f1b9fe0de98bbbd3
10 changes: 5 additions & 5 deletions pvlib/tests/test_iam.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def test_iam_interp():
0, 10, 20, 30, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90,
])
IAM_DATA = np.array([
1.0000, 0.9989, 1.0014, 1.0002, 0.9984, 0.9941, 0.9911, 0.9815, 0.9631,
1.0000, 1.0000, 1.0014, 1.0002, 0.9984, 0.9941, 0.9911, 0.9815, 0.9631,
0.9352, 0.8922, 0.8134, 0.6778, 0.4541, 0.0000,
])

Expand Down Expand Up @@ -343,9 +343,9 @@ def test_marion_diffuse_iam_function_without_kwargs():
measurement, without any kwargs and with array input.
"""
expected = {
'sky': np.array([0.95664428, 0.96958797, 0.95665529, 0.88137573]),
'horizon': np.array([0.03718587, 0.94953826, 0.976997, 0.94862772]),
'ground': np.array([0., 0.88137573, 0.95665529, 0.96958797]),
'sky': np.array([0.95671526, 0.96967113, 0.95672627, 0.88137573]),
'horizon': np.array([0.03718587, 0.94953826, 0.97722834, 0.94862772]),
'ground': np.array([0., 0.88137573, 0.95672627, 0.96967113]),
}
actual = _iam.marion_diffuse(
_iam.pchip(AOI_DATA, IAM_DATA), np.array([0.0, 45, 90, 135])
Expand All @@ -358,7 +358,7 @@ def test_marion_diffuse_iam_function_without_kwargs():
def test_marion_diffuse_iam_with_kwargs():
"""Test custom IAM function (iam.interp) with kwargs and scalar input."""
expected = {
'sky': 0.9687461532452274,
'sky': 0.9688222974371822,
'horizon': 0.94824614710175,
'ground': 0.878266931831978,
}
Expand Down
0